diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 339a00ce7..8a1591d9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,8 @@ jobs: run: cargo doc --no-deps --document-private-items ${{ matrix.args }} - name: cargo clippy - run: cargo clippy --all-targets ${{ matrix.args }} + # Temporarily allow diverging_sub_expression until we figure out how to silence them in declare_class! + run: cargo clippy --all-targets ${{ matrix.args }} -- --allow=clippy::diverging_sub_expression msrv: name: Check MSRV diff --git a/crates/icrate/src/Foundation/additions/string.rs b/crates/icrate/src/Foundation/additions/string.rs index a94156a72..e893348ae 100644 --- a/crates/icrate/src/Foundation/additions/string.rs +++ b/crates/icrate/src/Foundation/additions/string.rs @@ -192,7 +192,7 @@ impl Ord for NSString { impl PartialOrd for NSMutableString { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - PartialOrd::partial_cmp(&**self, &**other) + Some(self.cmp(other)) } } diff --git a/crates/icrate/tests/exception.rs b/crates/icrate/tests/exception.rs index 6a14baac1..3fee217e6 100644 --- a/crates/icrate/tests/exception.rs +++ b/crates/icrate/tests/exception.rs @@ -46,7 +46,7 @@ fn unwrap() { ) .unwrap(); - let _: () = Err(exc).unwrap(); + panic!("{exc:?}"); } // Further tests in `tests::exception` diff --git a/crates/objc2/src/rc/id.rs b/crates/objc2/src/rc/id.rs index bb933766d..73012952a 100644 --- a/crates/objc2/src/rc/id.rs +++ b/crates/objc2/src/rc/id.rs @@ -231,6 +231,8 @@ impl Id { /// This is an associated method, and must be called as /// `Id::as_mut_ptr(obj)`. #[inline] + #[allow(unknown_lints)] // New lint below + #[allow(clippy::needless_pass_by_ref_mut)] pub fn as_mut_ptr(this: &mut Self) -> *mut T where T: IsMutable,