Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change format of cargo compile finish time taken #3752

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion listings/ch12-an-io-project/listing-12-02/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ cargo run -- test sample.txt
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep test sample.txt`
Searching for test
In file sample.txt
2 changes: 1 addition & 1 deletion listings/ch12-an-io-project/listing-12-04/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ cargo run -- the poem.txt
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep the poem.txt`
Searching for the
In file poem.txt
Expand Down
2 changes: 1 addition & 1 deletion listings/ch12-an-io-project/listing-12-07/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ cargo run
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep`
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', src/main.rs:27:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2 changes: 1 addition & 1 deletion listings/ch12-an-io-project/listing-12-08/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ cargo run
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep`
thread 'main' panicked at 'not enough arguments', src/main.rs:26:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2 changes: 1 addition & 1 deletion listings/ch12-an-io-project/listing-12-23/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ cargo run -- to poem.txt
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep to poem.txt`
Are you nobody, too?
How dreary to be somebody!
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ cargo run -- body poem.txt
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep body poem.txt`
I'm nobody! Who are you?
Are you nobody, too?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ cargo run -- monomorphization poem.txt
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep monomorphization poem.txt`
8 changes: 4 additions & 4 deletions nostarch/chapter01.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ entering the following command:
```
$ cargo build
Compiling hello_cargo v0.1.0 (file:///projects/hello_cargo)
Finished dev [unoptimized + debuginfo] target(s) in 2.85 secs
Finished dev [unoptimized + debuginfo] target(s) in 2.85s
```

This command creates an executable file in *target/debug/hello_cargo* (or
Expand All @@ -508,7 +508,7 @@ code and then run the resultant executable all in one command:

```
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/hello_cargo`
Hello, world!
```
Expand All @@ -526,7 +526,7 @@ output:
```
$ cargo run
Compiling hello_cargo v0.1.0 (file:///projects/hello_cargo)
Finished dev [unoptimized + debuginfo] target(s) in 0.33 secs
Finished dev [unoptimized + debuginfo] target(s) in 0.33s
Running `target/debug/hello_cargo`
Hello, world!
```
Expand All @@ -537,7 +537,7 @@ your code to make sure it compiles but doesn’t produce an executable:
```
$ cargo check
Checking hello_cargo v0.1.0 (file:///projects/hello_cargo)
Finished dev [unoptimized + debuginfo] target(s) in 0.32 secs
Finished dev [unoptimized + debuginfo] target(s) in 0.32s
```

Why would you not want an executable? Often, `cargo check` is much faster than
Expand Down
2 changes: 1 addition & 1 deletion nostarch/chapter02.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ build again, you’ll only see two lines of output:
```
$ cargo build
Compiling guessing_game v0.1.0 (file:///projects/guessing_game)
Finished dev [unoptimized + debuginfo] target(s) in 2.53 secs
Finished dev [unoptimized + debuginfo] target(s) in 2.53s
```

These lines show that Cargo only updates the build with your tiny change to the
Expand Down
14 changes: 7 additions & 7 deletions nostarch/chapter12.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ and `sample.txt`:
```
$ cargo run -- test sample.txt
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep test sample.txt`
Searching for test
In file sample.txt
Expand Down Expand Up @@ -270,7 +270,7 @@ second argument:
```
$ cargo run -- the poem.txt
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep the poem.txt`
Searching for the
In file poem.txt
Expand Down Expand Up @@ -553,7 +553,7 @@ without any arguments; it will look like this:
```
$ cargo run
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep`
thread 'main' panicked at 'index out of bounds: the len is 1 but
the index is 1', src/main.rs:27:21
Expand Down Expand Up @@ -598,7 +598,7 @@ arguments again to see what the error looks like now:
```
$ cargo run
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep`
thread 'main' panicked at 'not enough arguments',
src/main.rs:26:13
Expand Down Expand Up @@ -1275,7 +1275,7 @@ Cool! Now let’s try a word that will match multiple lines, like *body*:

```
$ cargo run -- body poem.txt
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep body poem.txt`
I'm nobody! Who are you?
Are you nobody, too?
Expand All @@ -1287,7 +1287,7 @@ word that isn’t anywhere in the poem, such as *monomorphization*:

```
$ cargo run -- monomorphization poem.txt
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep monomorphization poem.txt`
```

Expand Down Expand Up @@ -1545,7 +1545,7 @@ the word *to* in all lowercase:
```
$ cargo run -- to poem.txt
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/minigrep to poem.txt`
Are you nobody, too?
How dreary to be somebody!
Expand Down
6 changes: 3 additions & 3 deletions nostarch/chapter14.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ These profile names might be familiar from the output of your builds:

```
$ cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
$ cargo build --release
Finished release [optimized] target(s) in 0.0s
Finished release [optimized] target(s) in 0.00s
```

The `dev` and `release` are these different profiles used by the compiler.
Expand Down Expand Up @@ -773,7 +773,7 @@ with `cargo run`:

```
$ cargo run -p adder
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/adder`
Hello, world! 10 plus one is 11!
```
Expand Down
8 changes: 4 additions & 4 deletions src/ch01-03-hello-cargo.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ entering the following command:
```console
$ cargo build
Compiling hello_cargo v0.1.0 (file:///projects/hello_cargo)
Finished dev [unoptimized + debuginfo] target(s) in 2.85 secs
Finished dev [unoptimized + debuginfo] target(s) in 2.85s
```

This command creates an executable file in *target/debug/hello_cargo* (or
Expand All @@ -151,7 +151,7 @@ code and then run the resultant executable all in one command:

```console
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/hello_cargo`
Hello, world!
```
Expand All @@ -169,7 +169,7 @@ output:
```console
$ cargo run
Compiling hello_cargo v0.1.0 (file:///projects/hello_cargo)
Finished dev [unoptimized + debuginfo] target(s) in 0.33 secs
Finished dev [unoptimized + debuginfo] target(s) in 0.33s
Running `target/debug/hello_cargo`
Hello, world!
```
Expand All @@ -180,7 +180,7 @@ your code to make sure it compiles but doesn’t produce an executable:
```console
$ cargo check
Checking hello_cargo v0.1.0 (file:///projects/hello_cargo)
Finished dev [unoptimized + debuginfo] target(s) in 0.32 secs
Finished dev [unoptimized + debuginfo] target(s) in 0.32s
```

Why would you not want an executable? Often, `cargo check` is much faster than
Expand Down
2 changes: 1 addition & 1 deletion src/ch02-00-guessing-game-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ cargo build -->
```console
$ cargo build
Compiling guessing_game v0.1.0 (file:///projects/guessing_game)
Finished dev [unoptimized + debuginfo] target(s) in 2.53 secs
Finished dev [unoptimized + debuginfo] target(s) in 2.53s
```

These lines show that Cargo only updates the build with your tiny change to the
Expand Down
4 changes: 2 additions & 2 deletions src/ch14-01-release-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ and ensure output below is accurate

```console
$ cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
$ cargo build --release
Finished release [optimized] target(s) in 0.0s
Finished release [optimized] target(s) in 0.00s
```

The `dev` and `release` are these different profiles used by the compiler.
Expand Down
2 changes: 1 addition & 1 deletion src/ch14-03-cargo-workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ copy output below; the output updating script doesn't handle subdirectories in p

```console
$ cargo run -p adder
Finished dev [unoptimized + debuginfo] target(s) in 0.0s
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/adder`
Hello, world! 10 plus one is 11!
```
Expand Down