Enable clippy::derivable_impls
(#8836)
This PR enables the [`clippy::derivable_impls`](https://rust-lang.github.io/rust-clippy/master/index.html#/derivable_impls) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
a860530a2e
commit
12980dd88f
2 changed files with 1 additions and 9 deletions
|
@ -54,6 +54,7 @@ impl LanguageModel for FakeLanguageModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
pub struct FakeEmbeddingProvider {
|
pub struct FakeEmbeddingProvider {
|
||||||
pub embedding_count: AtomicUsize,
|
pub embedding_count: AtomicUsize,
|
||||||
}
|
}
|
||||||
|
@ -66,14 +67,6 @@ impl Clone for FakeEmbeddingProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for FakeEmbeddingProvider {
|
|
||||||
fn default() -> Self {
|
|
||||||
FakeEmbeddingProvider {
|
|
||||||
embedding_count: AtomicUsize::default(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl FakeEmbeddingProvider {
|
impl FakeEmbeddingProvider {
|
||||||
pub fn embedding_count(&self) -> usize {
|
pub fn embedding_count(&self) -> usize {
|
||||||
self.embedding_count.load(atomic::Ordering::SeqCst)
|
self.embedding_count.load(atomic::Ordering::SeqCst)
|
||||||
|
|
|
@ -85,7 +85,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
|
||||||
"clippy::cast_abs_to_unsigned",
|
"clippy::cast_abs_to_unsigned",
|
||||||
"clippy::cmp_owned",
|
"clippy::cmp_owned",
|
||||||
"clippy::crate_in_macro_def",
|
"clippy::crate_in_macro_def",
|
||||||
"clippy::derivable_impls",
|
|
||||||
"clippy::derive_ord_xor_partial_ord",
|
"clippy::derive_ord_xor_partial_ord",
|
||||||
"clippy::eq_op",
|
"clippy::eq_op",
|
||||||
"clippy::implied_bounds_in_impls",
|
"clippy::implied_bounds_in_impls",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue