chore: Appease nightly clippy
This commit is contained in:
parent
7026adb366
commit
006393c581
|
@ -1,5 +1,8 @@
|
|||
// This is a new lint with false positives, see https://github.com/rust-lang/rust-clippy/issues/10318
|
||||
#![allow(clippy::extra_unused_type_parameters)]
|
||||
// This lint is helpful, but right now we have too many instances of it.
|
||||
// TODO: Remove this once all instances are fixed.
|
||||
#![allow(clippy::needless_pass_by_ref_mut)]
|
||||
|
||||
#[macro_use]
|
||||
mod display_object;
|
||||
|
|
|
@ -313,9 +313,7 @@ impl Eq for Timer<'_> {}
|
|||
|
||||
impl PartialOrd for Timer<'_> {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||
self.tick_time
|
||||
.partial_cmp(&other.tick_time)
|
||||
.map(|o| o.reverse())
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
#![allow(clippy::extra_unused_type_parameters)]
|
||||
// Remove this when we decide on how to handle multithreaded rendering (especially on wasm)
|
||||
#![allow(clippy::arc_with_non_send_sync)]
|
||||
// This lint is helpful, but right now we have too many instances of it.
|
||||
// TODO: Remove this once all instances are fixed.
|
||||
#![allow(clippy::needless_pass_by_ref_mut)]
|
||||
|
||||
use crate::bitmaps::BitmapSamplers;
|
||||
use crate::buffer_pool::{BufferPool, PoolEntry};
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// This lint is helpful, but right now we have too many instances of it.
|
||||
// TODO: Remove this once all instances are fixed.
|
||||
#![allow(clippy::needless_pass_by_ref_mut)]
|
||||
|
||||
use ruffle_core::context::UpdateContext;
|
||||
use ruffle_core::external::Value as ExternalValue;
|
||||
use ruffle_core::external::{ExternalInterfaceMethod, ExternalInterfaceProvider};
|
||||
|
|
|
@ -485,7 +485,7 @@ impl<R: RangeBounds<usize>> IndexMut<R> for WStr {
|
|||
}
|
||||
}
|
||||
|
||||
impl core::cmp::PartialEq<WStr> for WStr {
|
||||
impl core::cmp::PartialEq for WStr {
|
||||
#[inline]
|
||||
fn eq(&self, other: &WStr) -> bool {
|
||||
super::ops::str_eq(self, other)
|
||||
|
@ -501,6 +501,13 @@ impl core::cmp::Ord for WStr {
|
|||
}
|
||||
}
|
||||
|
||||
impl core::cmp::PartialOrd for WStr {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
impl core::hash::Hash for WStr {
|
||||
#[inline]
|
||||
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
|
||||
|
@ -582,13 +589,6 @@ macro_rules! __wstr_impl_internal {
|
|||
};
|
||||
|
||||
(@eq_ord_self [$($generics:tt)*] for $ty:ty) => {
|
||||
impl<$($generics)*> ::core::cmp::PartialOrd<$ty> for $ty {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &$ty) -> Option<::core::cmp::Ordering> {
|
||||
Some(::core::cmp::Ord::cmp(self, other))
|
||||
}
|
||||
}
|
||||
|
||||
$crate::__wstr_impl_internal! { @eq_ord_units [$($generics)* const N: usize] for $ty, [u8; N] }
|
||||
$crate::__wstr_impl_internal! { @eq_ord_units [$($generics)* const N: usize] for $ty, [u16; N] }
|
||||
$crate::__wstr_impl_internal! { @eq_ord_units [$($generics)*] for $ty, [u8] }
|
||||
|
@ -621,6 +621,7 @@ macro_rules! __wstr_impl_internal {
|
|||
}
|
||||
}
|
||||
|
||||
#[automatically_derived]
|
||||
impl<$($generics)*> ::core::cmp::Ord for $ty {
|
||||
#[inline]
|
||||
fn cmp(&self, other: &Self) -> ::core::cmp::Ordering {
|
||||
|
@ -628,6 +629,14 @@ macro_rules! __wstr_impl_internal {
|
|||
}
|
||||
}
|
||||
|
||||
#[automatically_derived]
|
||||
impl<$($generics)*> ::core::cmp::PartialOrd<$ty> for $ty {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &$ty) -> Option<::core::cmp::Ordering> {
|
||||
Some(::core::cmp::Ord::cmp(::core::ops::Deref::deref(self), other))
|
||||
}
|
||||
}
|
||||
|
||||
impl<$($generics)*> ::core::hash::Hash for $ty {
|
||||
#[inline]
|
||||
fn hash<H: ::core::hash::Hasher>(&self, state: &mut H) {
|
||||
|
|
Loading…
Reference in New Issue