mirror of
https://github.com/rust-lang/book.git
synced 2026-09-15 07:49:25 -04:00
Standardize on unix $ rather than windows >
This commit is contained in:
@@ -137,7 +137,7 @@ through compiler errors.
|
||||
And check again:
|
||||
|
||||
```text
|
||||
> cargo check
|
||||
$ cargo check
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
error: no method named `execute` found for type `()` in the current scope
|
||||
--> src\main.rs:15:14
|
||||
@@ -168,7 +168,7 @@ impl ThreadPool {
|
||||
Let's check again:
|
||||
|
||||
```text
|
||||
> cargo check
|
||||
$ cargo check
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
error[E0061]: this function takes 0 parameters but 1 parameter was supplied
|
||||
--> src\main.rs:15:22
|
||||
@@ -219,7 +219,7 @@ fn execute<F>(&self, f: F)
|
||||
Let's check again:
|
||||
|
||||
```text
|
||||
> cargo check
|
||||
$ cargo check
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
warning: unused import: `std::thread`, #[warn(unused_imports)] on by default
|
||||
--> src\main.rs:5:5
|
||||
|
||||
@@ -45,7 +45,7 @@ impl ThreadPool {
|
||||
We get an error:
|
||||
|
||||
```text
|
||||
> cargo check
|
||||
$ cargo check
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
error[E0308]: mismatched types
|
||||
--> src\main.rs:70:46
|
||||
|
||||
@@ -98,7 +98,7 @@ the channel into `Worker::new`, and then we use it inside of the closure.
|
||||
If we try to compile this, we get this error:
|
||||
|
||||
```text
|
||||
> cargo check
|
||||
$ cargo check
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
error[E0382]: use of moved value: `job_receiver`
|
||||
--> src\main.rs:82:48
|
||||
@@ -224,7 +224,7 @@ a time tries to request a job.
|
||||
Here's the error we'll get if we try to compile the above code:
|
||||
|
||||
```text
|
||||
> cargo check
|
||||
$ cargo check
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
error: no method named `job` found for type `Job` in the current scope
|
||||
--> src\main.rs:69:21
|
||||
@@ -254,7 +254,7 @@ It looks a little funky, but it works. Well, almost. Now we get a different
|
||||
error:
|
||||
|
||||
```text
|
||||
> cargo check
|
||||
$ cargo check
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
error[E0161]: cannot move a value of type std::ops::FnOnce() +
|
||||
std::marker::Send + 'static: the size of std::ops::FnOnce() + std::marker::Send
|
||||
@@ -338,7 +338,7 @@ With this trick, our thread pool is in a working state! Give it a `cargo run`,
|
||||
and make some requests:
|
||||
|
||||
```text
|
||||
> cargo run
|
||||
$ cargo run
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
warning: field is never used: `threads`, #[warn(dead_code)] on by default
|
||||
--> src\main.rs:50:5
|
||||
|
||||
@@ -25,7 +25,7 @@ worker's thread. An `unwrap` disregards the errors.
|
||||
Here's the error we get:
|
||||
|
||||
```text
|
||||
> cargo run
|
||||
$ cargo run
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
error[E0507]: cannot move out of borrowed content
|
||||
--> src\main.rs:129:13
|
||||
@@ -51,7 +51,7 @@ struct Worker {
|
||||
And then let the compiler tell us about anything we need to fix:
|
||||
|
||||
```text
|
||||
> cargo check
|
||||
$ cargo check
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
error[E0308]: mismatched types
|
||||
--> src\main.rs:87:21
|
||||
@@ -251,7 +251,7 @@ And then run it with `cargo run`. Load up the pages a few times, and then check
|
||||
your terminal. You'll see something like this:
|
||||
|
||||
```text
|
||||
> cargo run
|
||||
$ cargo run
|
||||
Compiling hello v0.1.0 (file:///projects/hello/src/hello)
|
||||
Finished dev [unoptimized + debuginfo] target(s) in 1.0 secs
|
||||
Running `target\debug\hello.exe`
|
||||
|
||||
Reference in New Issue
Block a user