Converted Listing 7-1 into <Listing>

This commit is contained in:
SpectralPixel
2024-05-26 13:09:46 +02:00
parent f1e49bf7a8
commit 7cd0748d8d

View File

@@ -114,14 +114,13 @@ restaurant --lib`. Then enter the code in Listing 7-1 into *src/lib.rs* to
define some modules and function signatures; this code is the front of house
section.
<span class="filename">Filename: src/lib.rs</span>
<Listing number="7-1" file-name="src/lib.rs" caption="A `front_of_house` module containing other modules that then contain functions">
```rust,noplayground
{{#rustdoc_include ../listings/ch07-managing-growing-projects/listing-07-01/src/lib.rs}}
```
<span class="caption">Listing 7-1: A `front_of_house` module containing other
modules that then contain functions</span>
</Listing>
We define a module with the `mod` keyword followed by the name of the module
(in this case, `front_of_house`). The body of the module then goes inside curly