Skip to content

Commit 8cff646

Browse files
authored
wording fix, added note
1 parent 7efd767 commit 8cff646

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust_module_fuckery.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In the `src/bin/submodule.rs` you can improt the module specified in lib.rs:
2222
The (dis)advantage of multiple bin crates is obvious, you will need to execute them individually using `--bin` flag of the compiler / runner, e.g. `cargo run --bin <fname without rs>`
2323

2424
## How to import stuff globally using `lib.rs`?
25-
Nice to know is also that you can import things like Rocket or Diesel globally using Lib.rs:
25+
Nice to know is also that you can "import" external crates like Rocket or Diesel globally using Lib.rs:
2626
```rust
2727
// lib.rs
2828
// your consts here
@@ -33,6 +33,7 @@ extern crate rocket;
3333
extern crate rocket_dyn_templates; // optional
3434
extern crate diesel;
3535
```
36+
Note: Obviously the `use` keyword in the mentioned binary crates, so the module(s) (files), needs to be used to import the external crates.
3637

3738
## How to find the project name?
3839
In `Cargo.toml` is the project name defined!

0 commit comments

Comments
 (0)