From fc634adba111ac13ef9daafe44edb8593cd0f67c Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Fri, 8 Jan 2016 11:54:15 -0500 Subject: [PATCH] remove my home directory from path names --- src/compound-types.md | 6 +++--- src/functions.md | 20 ++++++++++---------- src/if.md | 12 ++++++------ src/loops.md | 8 ++++---- src/references-and-borrowing.md | 2 +- src/structs.md | 2 +- src/testing.md | 4 ++-- src/using-rust-from-other-languages.md | 2 +- src/variable-bindings.md | 20 ++++++++++---------- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/compound-types.md b/src/compound-types.md index 7f94dbdb3..16cb4168a 100644 --- a/src/compound-types.md +++ b/src/compound-types.md @@ -149,7 +149,7 @@ run it: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` thread ‘
’ panicked at ‘index out of bounds: the len is 5 but the index is 10’, src/main.rs:4 Process didn’t exit successfully: `target/debug/functions` (exit code: 101) @@ -186,7 +186,7 @@ fn main() { ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) src/main.rs:4:25: 4:26 error: the trait `core::fmt::Display` is not implemented for the type `[_; 5]` [E0277] src/main.rs:4 println!(“a is {}”, a); ^ @@ -225,7 +225,7 @@ This will work: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` a is [1, 2, 3, 4, 5] ``` diff --git a/src/functions.md b/src/functions.md index f925bfffc..fde2b554f 100644 --- a/src/functions.md +++ b/src/functions.md @@ -46,7 +46,7 @@ Place the new example in `src/main.rs`, and run it: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` Hello, world! Another function. @@ -74,7 +74,7 @@ Let’s try running it: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` The value of x is: 5 ``` @@ -126,7 +126,7 @@ Let’s try it: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` The value of x is: 5 The value of y is: 6 @@ -152,7 +152,7 @@ This has the same effect: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` The value of x is: 5 The value of y is: 6 @@ -190,7 +190,7 @@ Let’s try running it: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` The value of x is: 5 ``` @@ -264,7 +264,7 @@ If we try to run this program, we’ll get an error: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) src/main.rs:2:14: 2:17 error: expected identifier, found keyword `let` src/main.rs:2 let x = (let y = 6); ^~~ @@ -309,7 +309,7 @@ fn main() { Let’s try running this program: ```bash - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` The value of y is: 11 ``` @@ -369,7 +369,7 @@ Running this gives: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` The value of y is: 6 The value of y is: 6 @@ -413,7 +413,7 @@ Running this gives an error: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) src/main.rs:7:1: 9:2 error: not all control paths return a value [E0269] src/main.rs:7 fn plus_one(x: i32) -> i32 { src/main.rs:8 x + 1; @@ -466,7 +466,7 @@ Running this will show us the values: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` The value of x is: 5 The value of y is: 6 diff --git a/src/if.md b/src/if.md index aa0c22e10..b90d197ca 100644 --- a/src/if.md +++ b/src/if.md @@ -38,7 +38,7 @@ Let's try running it: ```bash $ cargo run - Compiling branches v0.1.0 (file:///home/steve/tmp/branches) + Compiling branches v0.1.0 (file:///projects/branches) Running `target/debug/branches` condition was true ``` @@ -53,7 +53,7 @@ And then run it again: ```bash $ cargo run - Compiling branches v0.1.0 (file:///home/steve/tmp/branches) + Compiling branches v0.1.0 (file:///projects/branches) Running `target/debug/branches` condition was false ``` @@ -92,7 +92,7 @@ fn main() { If we try to run this program, Rust will complain: ```bash - Compiling branches v0.1.0 (file:///home/steve/tmp/branches) + Compiling branches v0.1.0 (file:///projects/branches) src/main.rs:4:8: 4:17 error: mismatched types: expected `bool`, found `_` @@ -131,7 +131,7 @@ Let's try running it: ```bash $ cargo run - Compiling branches v0.1.0 (file:///home/steve/tmp/branches) + Compiling branches v0.1.0 (file:///projects/branches) Running `target/debug/branches` condition was 5 ``` @@ -166,7 +166,7 @@ Let’s run this: ```bash $ cargo run - Compiling branches v0.1.0 (file:///home/steve/tmp/branches) + Compiling branches v0.1.0 (file:///projects/branches) Running `target/debug/branches` The value of number is: 5 ``` @@ -195,7 +195,7 @@ fn main() { If we try to run this, we’ll get an error: ```bash - Compiling branches v0.1.0 (file:///home/steve/tmp/branches) + Compiling branches v0.1.0 (file:///projects/branches) src/main.rs:4:18: 8:6 error: if and else have incompatible types: expected `_`, found `&‘static str` diff --git a/src/loops.md b/src/loops.md index f84315451..58a19f6c3 100644 --- a/src/loops.md +++ b/src/loops.md @@ -34,7 +34,7 @@ a keyboard shortcut, ‘control-c’, to stop a runaway program. Give it a try: ```bash $ cargo run - Compiling loops v0.1.0 (file:///home/steve/tmp/loops) + Compiling loops v0.1.0 (file:///projects/loops) Running `target/debug/loops` again! again! @@ -65,7 +65,7 @@ time: ```bash $ cargo run - Compiling loops v0.1.0 (file:///home/steve/tmp/loops) + Compiling loops v0.1.0 (file:///projects/loops) Running `target/debug/loops` once! ``` @@ -99,7 +99,7 @@ fn main() { If we run this, we’ll get some output: ```bash - Compiling loops v0.1.0 (file:///home/steve/tmp/loops) + Compiling loops v0.1.0 (file:///projects/loops) Running `target/debug/loops` 3! 2! @@ -162,7 +162,7 @@ Running this will print out every element of the array: ```bash $ cargo run - Compiling loops v0.1.0 (file:///home/steve/tmp/loops) + Compiling loops v0.1.0 (file:///projects/loops) Running `target/debug/loops` the value is: 1 the value is: 2 diff --git a/src/references-and-borrowing.md b/src/references-and-borrowing.md index 77c830462..c60a0e21a 100644 --- a/src/references-and-borrowing.md +++ b/src/references-and-borrowing.md @@ -20,7 +20,7 @@ Let’s try running it: ```bash $ cargo run - Compiling functions v0.1.0 (file:///home/steve/tmp/functions) + Compiling functions v0.1.0 (file:///projects/functions) Running `target/debug/functions` The value of s is: [1, 2] ``` diff --git a/src/structs.md b/src/structs.md index a0696c96e..f94e4dc2a 100644 --- a/src/structs.md +++ b/src/structs.md @@ -45,7 +45,7 @@ Let's try running this program with `cargo run`: ```bash $ cargo run - Compiling points v0.1.0 (file:///home/steve/tmp/points) + Compiling points v0.1.0 (file:///projects/points) Running `target/debug/points` Point 1: (0, 5) Point 2: (12, 0) diff --git a/src/testing.md b/src/testing.md index dc8d2347f..5a9e2de61 100644 --- a/src/testing.md +++ b/src/testing.md @@ -96,7 +96,7 @@ test it_works ... FAILED failures: ---- it_works stdout ---- - thread 'it_works' panicked at 'assertion failed: false', /home/steve/tmp/adder/src/lib.rs:3 + thread 'it_works' panicked at 'assertion failed: false', /projects/adder/src/lib.rs:3 @@ -473,7 +473,7 @@ Let's run the tests again: ```bash $ cargo test - Compiling adder v0.0.1 (file:///home/steve/tmp/adder) + Compiling adder v0.0.1 (file:///projects/adder) Running target/adder-91b3e234d4ed382a running 1 test diff --git a/src/using-rust-from-other-languages.md b/src/using-rust-from-other-languages.md index 71efc91ce..126835a44 100644 --- a/src/using-rust-from-other-languages.md +++ b/src/using-rust-from-other-languages.md @@ -163,7 +163,7 @@ Let’s build the project now: ```bash $ cargo build --release - Compiling embed v0.1.0 (file:///home/steve/src/embed) + Compiling embed v0.1.0 (file:///projects/embed) ``` We’ve chosen `cargo build --release`, which builds with optimizations on. We diff --git a/src/variable-bindings.md b/src/variable-bindings.md index d32195fea..d3aacd640 100644 --- a/src/variable-bindings.md +++ b/src/variable-bindings.md @@ -38,7 +38,7 @@ And finally, run it: ```bash $ cargo run - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) Running `target/debug/bindings` The value of x is: 5 ``` @@ -142,7 +142,7 @@ And run it with `cargo run`: ```text $ cargo run - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) Running `target/debug/bindings` The value of x is: 5 The value of y is: 6 @@ -242,7 +242,7 @@ And run it with `cargo run`: ```text $ cargo run - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) Running `target/debug/bindings` The value of x is: 5 ``` @@ -264,7 +264,7 @@ fn main() { We can find out the answer with `cargo run`: ```text - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) src/main.rs:4:39: 4:40 error: use of possibly uninitialized variable: `x` [E0381] src/main.rs:4 println!(“The value of x is: {}”, x); ^ @@ -334,7 +334,7 @@ fn main() { ```bash $ cargo run - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) src/main.rs:4:5: 4:10 error: re-assignment of immutable variable `x` [E0384] src/main.rs:4 x = 6; ^~~~~ @@ -365,7 +365,7 @@ Running this, we get: ```bash $ cargo run - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) Running `target/debug/bindings` The value of x is: 5 The value of x is: 6 @@ -389,7 +389,7 @@ The compiler will complain about this program: ```bash $ cargo build - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) src/main.rs:5:5: 5:10 error: re-assignment of immutable variable `y` [E0384] src/main.rs:5 y = 8; ^~~~~ @@ -517,7 +517,7 @@ fn main() { This will print: ```bash - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) Running `target/debug/bindings` The value of x is: 12 ``` @@ -562,7 +562,7 @@ If we try to compile, we get an error: ```bash $ cargo build - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) src/main.rs:8:5: 8:11 error: re-assignment of immutable variable `x` [E0384] src/main.rs:8 x = 15; ^~~~~~ @@ -630,7 +630,7 @@ If we run this example, we can see the shadow appear and disappear: ```bash $ cargo run - Compiling bindings v0.1.0 (file:///home/steve/tmp/bindings) + Compiling bindings v0.1.0 (file:///projects/bindings) Running `target/debug/bindings` Before shadowing, x is: 5 Now that x is shadowed, x is: 6