X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/5baae0ea037ed642b7fe8975fb3004b29827d5b1..a43cc90b79e0b17302c74982270e29a4b93f5f0f:/src/part14.rs diff --git a/src/part14.rs b/src/part14.rs index eb2011a..2105838 100644 --- a/src/part14.rs +++ b/src/part14.rs @@ -59,7 +59,7 @@ fn sort_nums(data: &mut Vec) { } // ## Arrays -//@ An *array* in Rust is given be the type `[T; n]`, where `n` is some *fixed* number. So, `[f64; 10]` is an array of 10 floating-point +//@ An *array* in Rust is given by the type `[T; n]`, where `n` is some *fixed* number. So, `[f64; 10]` is an array of 10 floating-point //@ numbers, all one right next to the other in memory. Arrays are sized, and hence can be used like any other type. But we can also //@ borrow them as slices, e.g., to sort them. fn sort_array() { @@ -69,7 +69,7 @@ fn sort_array() { // ## External Dependencies //@ This leaves us with just one more piece to complete rgrep: Taking arguments from the command-line. We could now directly work on -//@ [`std::env::args`](http://doc.rust-lang.org/stable/std/env/fn.args.html) to gain access to those arguments, and this would become +//@ [`std::env::args`](https://doc.rust-lang.org/stable/std/env/fn.args.html) to gain access to those arguments, and this would become //@ a pretty boring lesson in string manipulation. Instead, I want to use this opportunity to show how easy it is to benefit from //@ other people's work in your program. //@