mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-18 04:23:14 +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:
parent
c0dfd54f2c
commit
26c088497f
@ -18,6 +18,10 @@
|
||||
|
||||
```rust,ignore
|
||||
// ---- src/widgets.rs ----
|
||||
mod button;
|
||||
mod label;
|
||||
mod window;
|
||||
|
||||
pub trait Widget {
|
||||
/// Natural width of `self`.
|
||||
fn width(&self) -> usize;
|
||||
@ -172,6 +176,8 @@ impl Widget for Window {
|
||||
|
||||
```rust,ignore
|
||||
// ---- src/main.rs ----
|
||||
mod widgets;
|
||||
|
||||
use widgets::Widget;
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user