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:
@@ -54,6 +54,7 @@ impl LanguageModel for FakeLanguageModel {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct FakeEmbeddingProvider {
|
||||
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 {
|
||||
pub fn embedding_count(&self) -> usize {
|
||||
self.embedding_count.load(atomic::Ordering::SeqCst)
|
||||
|
||||
@@ -85,7 +85,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
|
||||
"clippy::cast_abs_to_unsigned",
|
||||
"clippy::cmp_owned",
|
||||
"clippy::crate_in_macro_def",
|
||||
"clippy::derivable_impls",
|
||||
"clippy::derive_ord_xor_partial_ord",
|
||||
"clippy::eq_op",
|
||||
"clippy::implied_bounds_in_impls",
|
||||
|
||||
Reference in New Issue
Block a user