Skip to content

Commit

Permalink
Fix/suppress new Clippy warnings introduced in Rust 1.82
Browse files Browse the repository at this point in the history
  • Loading branch information
Keavon committed Oct 25, 2024
1 parent c3a3c4c commit a395fbf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions node-graph/gcore/src/raster/adjustments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,8 @@ impl Adjust<Color> for Color {
}
impl Adjust<Color> for Option<Color> {
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
match self {
Some(ref mut v) => *v = map_fn(v),
None => (),
if let Some(ref mut v) = self {
*v = map_fn(v)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions node-graph/graph-craft/src/document/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ macro_rules! tagged_value {
/// A type that is known, allowing serialization (serde::Deserialize is not object safe)
#[derive(Clone, Debug, PartialEq)]
#[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 {
None,
$( $(#[$meta] ) *$identifier( $ty ), )*
Expand Down
2 changes: 1 addition & 1 deletion website/other/bezier-rs-demos/wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn init() {
log::set_logger(&LOGGER).expect("Failed to set logger");
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
if HAS_CRASHED.with(|cell| cell.replace(true)) {
return;
Expand Down

0 comments on commit a395fbf

Please sign in to comment.