mirror of
https://github.com/theoludwig/rust_book.git
synced 2024-07-17 08:30:11 +02:00
docs(chap1): extend info about usage of prelude
This commit is contained in:
parent
2a41387d8e
commit
681fd0c0c9
@ -1,5 +1,7 @@
|
||||
// Scope of a program => prelude
|
||||
// If a type you want to use isn't in the prelude, you have to bring that type into scope explicitly with a `use` statement.
|
||||
// Sometimes it's best not to use the prelude to ->avoid name conflicts<-when importing other crates, or especially when using
|
||||
// common data structures for instance HashMaps because of ->performance reasons<-, so we tend to use std::collections::BTreeMap instead
|
||||
use std::io::{self, Write};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user