mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
Fix docs: use type inference
This commit is contained in:
parent
d37ee6ffa0
commit
7b5f54954a
@ -20,12 +20,12 @@ declare_clippy_lint! {
|
||||
/// **Example:**
|
||||
///
|
||||
/// ```rust
|
||||
/// let mut v: Vec<u32> = Vec::new();
|
||||
/// let mut v = Vec::new();
|
||||
/// v.push(0);
|
||||
/// ```
|
||||
/// Use instead:
|
||||
/// ```rust
|
||||
/// let v: Vec<u32> = vec![0];
|
||||
/// let v = vec![0];
|
||||
/// ```
|
||||
pub VEC_INIT_THEN_PUSH,
|
||||
perf,
|
||||
|
Loading…
Reference in New Issue
Block a user