1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-18 12:30:31 +02:00

Add missing mod declarations to modules solutions (#1601)

The solution for the modules exercise does not work since it is missing
a a few module declarations. Here, we add them.
This commit is contained in:
Martin Huschenbett 2023-12-20 16:34:39 +01:00 committed by GitHub
parent c0dfd54f2c
commit 26c088497f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,10 @@
```rust,ignore ```rust,ignore
// ---- src/widgets.rs ---- // ---- src/widgets.rs ----
mod button;
mod label;
mod window;
pub trait Widget { pub trait Widget {
/// Natural width of `self`. /// Natural width of `self`.
fn width(&self) -> usize; fn width(&self) -> usize;
@ -172,6 +176,8 @@ impl Widget for Window {
```rust,ignore ```rust,ignore
// ---- src/main.rs ---- // ---- src/main.rs ----
mod widgets;
use widgets::Widget; use widgets::Widget;
fn main() { fn main() {