From 85ac8343431ef693ca07dcbce1e73f17f4c5ec7d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 5 Oct 2015 22:02:05 +0200 Subject: [PATCH] RingBuf was renamed to VecDeque (fixes #363) --- README.md | 2 +- src/types.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e15ed7e8f..2147530ff 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ name [len_zero](https://github.com/Manishearth/rust-clippy/wiki#len_zero) | warn | checking `.len() == 0` or `.len() > 0` (or similar) when `.is_empty()` could be used instead [let_and_return](https://github.com/Manishearth/rust-clippy/wiki#let_and_return) | warn | creating a let-binding and then immediately returning it like `let x = expr; x` at the end of a block [let_unit_value](https://github.com/Manishearth/rust-clippy/wiki#let_unit_value) | warn | creating a let binding to a value of unit type, which usually can't be used afterwards -[linkedlist](https://github.com/Manishearth/rust-clippy/wiki#linkedlist) | warn | usage of LinkedList, usually a vector is faster, or a more specialized data structure like a RingBuf +[linkedlist](https://github.com/Manishearth/rust-clippy/wiki#linkedlist) | warn | usage of LinkedList, usually a vector is faster, or a more specialized data structure like a VecDeque [match_ref_pats](https://github.com/Manishearth/rust-clippy/wiki#match_ref_pats) | warn | a match has all arms prefixed with `&`; the match expression can be dereferenced instead [min_max](https://github.com/Manishearth/rust-clippy/wiki#min_max) | warn | `min(_, max(_, _))` (or vice versa) with bounds clamping the result to a constant [modulo_one](https://github.com/Manishearth/rust-clippy/wiki#modulo_one) | warn | taking a number modulo 1, which always returns 0 diff --git a/src/types.rs b/src/types.rs index dd41b4f22..e9125085b 100644 --- a/src/types.rs +++ b/src/types.rs @@ -20,7 +20,7 @@ declare_lint!(pub BOX_VEC, Warn, "usage of `Box>`, vector elements are already on the heap"); declare_lint!(pub LINKEDLIST, Warn, "usage of LinkedList, usually a vector is faster, or a more specialized data \ - structure like a RingBuf"); + structure like a VecDeque"); impl LintPass for TypePass { fn get_lints(&self) -> LintArray { @@ -43,7 +43,7 @@ impl LateLintPass for TypePass { span_help_and_lint( cx, LINKEDLIST, ast_ty.span, "I see you're using a LinkedList! Perhaps you meant some other data structure?", - "a RingBuf might work"); + "a VecDeque might work"); } } }