Skip to content

Commit 44a80e8

Browse files
authored
Merge pull request #1532 from gokhanettin/update-module-file-hierarchy
Use rust 2018 module file hierarchy
2 parents c2a98d9 + fb27c66 commit 44a80e8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/mod/split.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ Modules can be mapped to a file/directory hierarchy. Let's break down the
66
```shell
77
$ tree .
88
.
9-
|-- my
10-
| |-- inaccessible.rs
11-
| |-- mod.rs
12-
| `-- nested.rs
13-
`-- split.rs
9+
├── my
10+
│   ├── inaccessible.rs
11+
│   └── nested.rs
12+
├── my.rs
13+
└── split.rs
1414
```
1515

1616
In `split.rs`:
1717

1818
```rust,ignore
19-
// This declaration will look for a file named `my.rs` or `my/mod.rs` and will
19+
// This declaration will look for a file named `my.rs` and will
2020
// insert its contents inside a module named `my` under this scope
2121
mod my;
2222
@@ -36,7 +36,7 @@ fn main() {
3636
3737
```
3838

39-
In `my/mod.rs`:
39+
In `my.rs`:
4040

4141
```rust,ignore
4242
// Similarly `mod inaccessible` and `mod nested` will locate the `nested.rs`

0 commit comments

Comments
 (0)