Skip to content

Commit

Permalink
Appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Aug 27, 2023
1 parent f04c88c commit 53bf196
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/icrate/src/Foundation/additions/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl Ord for NSString {
impl PartialOrd for NSMutableString {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
PartialOrd::partial_cmp(&**self, &**other)
Some(self.cmp(other))
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/icrate/tests/exception.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn unwrap() {
)
.unwrap();

let _: () = Err(exc).unwrap();
panic!("{exc:?}");
}

// Further tests in `tests::exception`
2 changes: 2 additions & 0 deletions crates/objc2/src/rc/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ impl<T: ?Sized + Message> Id<T> {
/// 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,
Expand Down

0 comments on commit 53bf196

Please sign in to comment.