Skip to content

Commit 3ed7d95

Browse files
committed
Appease clippy
1 parent f04c88c commit 3ed7d95

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ jobs:
150150
run: cargo doc --no-deps --document-private-items ${{ matrix.args }}
151151

152152
- name: cargo clippy
153-
run: cargo clippy --all-targets ${{ matrix.args }}
153+
# Temporarily allow diverging_sub_expression until we figure out how to silence them in declare_class!
154+
run: cargo clippy --all-targets ${{ matrix.args }} -- --allow=clippy::diverging_sub_expression
154155

155156
msrv:
156157
name: Check MSRV

crates/icrate/src/Foundation/additions/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl Ord for NSString {
192192
impl PartialOrd for NSMutableString {
193193
#[inline]
194194
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
195-
PartialOrd::partial_cmp(&**self, &**other)
195+
Some(self.cmp(other))
196196
}
197197
}
198198

crates/objc2/src/rc/id.rs

+2
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ impl<T: ?Sized + Message> Id<T> {
231231
/// This is an associated method, and must be called as
232232
/// `Id::as_mut_ptr(obj)`.
233233
#[inline]
234+
#[allow(unknown_lints)] // New lint below
235+
#[allow(clippy::needless_pass_by_ref_mut)]
234236
pub fn as_mut_ptr(this: &mut Self) -> *mut T
235237
where
236238
T: IsMutable,

0 commit comments

Comments
 (0)