Skip to content

Commit 6f299e7

Browse files
authored
Merge pull request #4069 from rust-lang/ch18-listing-fixup
Fix up `<Listing>` usage in Ch. 18
2 parents b28a2f6 + 1d595d8 commit 6f299e7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ch18-01-what-is-oo.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ on demand whenever anyone needs it. In other words, `AveragedCollection` will
4444
cache the calculated average for us. Listing 18-1 has the definition of the
4545
`AveragedCollection` struct:
4646

47-
<Listing number="18-1" file-name="src/lib.rs" caption="Listing 18-1: An `AveragedCollection` struct that maintains a list of integers and the average of the items in the collection">
47+
<Listing number="18-1" file-name="src/lib.rs" caption="An `AveragedCollection` struct that maintains a list of integers and the average of the items in the collection">
4848

4949
```rust,noplayground
5050
{{#rustdoc_include ../listings/ch18-oop/listing-18-01/src/lib.rs}}
@@ -58,9 +58,7 @@ ensure that whenever a value is added or removed from the list, the average is
5858
also updated. We do this by implementing `add`, `remove`, and `average` methods
5959
on the struct, as shown in Listing 18-2:
6060

61-
<Listing number="18-2" file-name="src/lib.rs" caption="Listing 18-2: Implementations of the public methods `add`, `remove`, and `average` on `AveragedCollection`">
62-
63-
<span class="filename">Filename: src/lib.rs</span>
61+
<Listing number="18-2" file-name="src/lib.rs" caption="Implementations of the public methods `add`, `remove`, and `average` on `AveragedCollection`">
6462

6563
```rust,noplayground
6664
{{#rustdoc_include ../listings/ch18-oop/listing-18-02/src/lib.rs:here}}

0 commit comments

Comments
 (0)