Fix docs: use type inference

This commit is contained in:
Jason Newcomb 2021-01-03 14:04:05 -05:00
parent d37ee6ffa0
commit 7b5f54954a
No known key found for this signature in database
GPG Key ID: DA59E8643A37ED06

View File

@ -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,