Merge pull request #1024 from pduzinki/spans-in-chapter-12

span element added on two listings in ch12-01
This commit is contained in:
Carol (Nichols || Goulding)
2017-11-27 15:15:41 -05:00
committed by GitHub

View File

@@ -51,8 +51,8 @@ fn main() {
}
```
Listing 12-1: Collect the command line arguments into a vector and print them
out
<span class="caption">Listing 12-1: Collect the command line arguments into
a vector and print them out</span>
First, we bring the `std::env` module into scope with a `use` statement so that
we can use its `args` function. Notice the `std::env::args` function is nested
@@ -124,7 +124,8 @@ fn main() {
}
```
Listing 12-2: Create variables to hold the query argument and filename argument
<span class="caption">Listing 12-2: Create variables to hold the query argument
and filename argument</span>
As we saw when we printed out the vector, the programs name takes up the first
value in the vector at `args[0]`, so that were starting at index `1`. The