mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 12:28:12 +08:00
Fix/suppress new Clippy warnings introduced in Rust 1.82
This commit is contained in:
@@ -810,9 +810,8 @@ impl Adjust<Color> for Color {
|
|||||||
}
|
}
|
||||||
impl Adjust<Color> for Option<Color> {
|
impl Adjust<Color> for Option<Color> {
|
||||||
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
|
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
|
||||||
match self {
|
if let Some(ref mut v) = self {
|
||||||
Some(ref mut v) => *v = map_fn(v),
|
*v = map_fn(v)
|
||||||
None => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ macro_rules! tagged_value {
|
|||||||
/// A type that is known, allowing serialization (serde::Deserialize is not object safe)
|
/// A type that is known, allowing serialization (serde::Deserialize is not object safe)
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
|
#[allow(clippy::large_enum_variant)] // TODO(TrueDoctor): Properly solve this disparity between the size of the largest and next largest variants
|
||||||
pub enum TaggedValue {
|
pub enum TaggedValue {
|
||||||
None,
|
None,
|
||||||
$( $(#[$meta] ) *$identifier( $ty ), )*
|
$( $(#[$meta] ) *$identifier( $ty ), )*
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ pub fn init() {
|
|||||||
log::set_logger(&LOGGER).expect("Failed to set logger");
|
log::set_logger(&LOGGER).expect("Failed to set logger");
|
||||||
log::set_max_level(log::LevelFilter::Trace);
|
log::set_max_level(log::LevelFilter::Trace);
|
||||||
|
|
||||||
fn panic_hook(info: &std::panic::PanicInfo<'_>) {
|
fn panic_hook(info: &std::panic::PanicHookInfo<'_>) {
|
||||||
// Skip if we have already panicked
|
// Skip if we have already panicked
|
||||||
if HAS_CRASHED.with(|cell| cell.replace(true)) {
|
if HAS_CRASHED.with(|cell| cell.replace(true)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user