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:
Marshall Bowers 2024-03-04 11:47:07 -05:00 committed by GitHub
parent a860530a2e
commit 12980dd88f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 9 deletions

View file

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

View file

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