Tidy up clippy config. (#1547)

* Checking cfg_attr is no longer necessary.
* Don't need multiple `clippy::` prefixes on a name.
This commit is contained in:
Bruce Mitchener
2022-09-26 09:37:55 +09:00
committed by GitHub
parent dac7da780e
commit ea8e6d7b1d
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ pub struct InvertedIndexReader {
}
impl InvertedIndexReader {
#[cfg_attr(feature = "cargo-clippy", allow(clippy::needless_pass_by_value))] // for symmetry
#[allow(clippy::needless_pass_by_value)] // for symmetry
pub(crate) fn new(
termdict: TermDictionary,
postings_file_slice: FileSlice,
+1 -1
View File
@@ -188,7 +188,7 @@ impl DeleteCursor {
}
}
#[cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))]
#[allow(clippy::wrong_self_convention)]
fn is_behind_opstamp(&mut self, target_opstamp: Opstamp) -> bool {
self.get()
.map(|operation| operation.opstamp < target_opstamp)
+1 -1
View File
@@ -31,7 +31,7 @@ pub use self::term_info::TermInfo;
pub(crate) type UnorderedTermId = u64;
#[cfg_attr(feature = "cargo-clippy", allow(clippy::enum_variant_names))]
#[allow(clippy::enum_variant_names)]
#[derive(Debug, PartialEq, Clone, Copy, Eq)]
pub(crate) enum FreqReadingOption {
NoFreq,
+1 -1
View File
@@ -136,7 +136,7 @@ where A: Automaton
}
/// Return the next `(key, value)` pair.
#[cfg_attr(feature = "cargo-clippy", allow(clippy::should_implement_trait))]
#[allow(clippy::should_implement_trait)]
pub fn next(&mut self) -> Option<(&[u8], &TermInfo)> {
if self.advance() {
Some((self.key(), self.value()))
+1 -1
View File
@@ -179,7 +179,7 @@ where
}
/// Return the next `(key, value)` pair.
#[cfg_attr(feature = "cargo-clippy", allow(clippy::should_implement_trait))]
#[allow(clippy::should_implement_trait)]
pub fn next(&mut self) -> Option<(&[u8], &TermInfo)> {
if self.advance() {
Some((self.key(), self.value()))
+1 -1
View File
@@ -52,7 +52,7 @@ impl<W: io::Write> TermDictionaryBuilder<W> {
/// to insert_key and insert_value.
///
/// Prefer using `.insert(key, value)`
#[allow(clippy::clippy::clippy::unnecessary_wraps)]
#[allow(clippy::unnecessary_wraps)]
pub(crate) fn insert_key(&mut self, key: &[u8]) -> io::Result<()> {
self.sstable_writer.write_key(key);
Ok(())