Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mvlabat committed Jan 7, 2024
1 parent e398680 commit da6a8f0
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pub use egui;
use crate::{
egui_node::{EguiPipeline, EGUI_SHADER_HANDLE},
render_systems::{EguiTransforms, ExtractedEguiManagedTextures},
systems::*,
};
#[cfg(all(
feature = "manage_clipboard",
Expand All @@ -90,7 +91,6 @@ use bevy::{
},
utils::HashMap,
};
use crate::systems::*;
use bevy::{
app::{App, Plugin, PostUpdate, PreStartup, PreUpdate},
ecs::{
Expand Down Expand Up @@ -152,22 +152,14 @@ pub struct EguiSettings {
}

// Just to keep the PartialEq
#[cfg(feature = "render")]
impl PartialEq for EguiSettings {
fn eq(&self, other: &Self) -> bool {
let eq = self.scale_factor == other.scale_factor;
#[cfg(feature = "open_url")]
let eq = eq && self.default_open_url_target == other.default_open_url_target;
eq && compare_descriptors(&self.sampler_descriptor, &other.sampler_descriptor)
}
}

#[cfg(not(feature = "render"))]
impl PartialEq for EguiSettings {
#[allow(clippy::let_and_return)]
fn eq(&self, other: &Self) -> bool {
let eq = self.scale_factor == other.scale_factor;
#[cfg(feature = "open_url")]
let eq = eq && self.default_open_url_target == other.default_open_url_target;
#[cfg(feature = "render")]
let eq = eq && compare_descriptors(&self.sampler_descriptor, &other.sampler_descriptor);
eq
}
}
Expand Down

0 comments on commit da6a8f0

Please sign in to comment.