mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
clippy fixes
This commit is contained in:
@@ -237,19 +237,11 @@ impl Widget for &mut MarkerDemo {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq)]
|
||||
#[derive(Default, PartialEq)]
|
||||
struct LegendDemo {
|
||||
config: Legend,
|
||||
}
|
||||
|
||||
impl Default for LegendDemo {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
config: Legend::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl LegendDemo {
|
||||
fn line_with_slope(slope: f64) -> Line {
|
||||
Line::new(Values::from_explicit_callback(move |x| slope * x, .., 100))
|
||||
@@ -381,15 +373,9 @@ impl Widget for &mut ItemsDemo {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq)]
|
||||
#[derive(Default, PartialEq)]
|
||||
struct InteractionDemo {}
|
||||
|
||||
impl Default for InteractionDemo {
|
||||
fn default() -> Self {
|
||||
Self {}
|
||||
}
|
||||
}
|
||||
|
||||
impl Widget for &mut InteractionDemo {
|
||||
fn ui(self, ui: &mut Ui) -> Response {
|
||||
let plot = Plot::new("interaction_demo").height(300.0);
|
||||
|
||||
@@ -253,17 +253,11 @@ impl super::View for ScrollTo {
|
||||
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
#[cfg_attr(feature = "serde", serde(default))]
|
||||
#[derive(PartialEq)]
|
||||
#[derive(Default, PartialEq)]
|
||||
struct ScrollStickTo {
|
||||
n_items: usize,
|
||||
}
|
||||
|
||||
impl Default for ScrollStickTo {
|
||||
fn default() -> Self {
|
||||
Self { n_items: 0 }
|
||||
}
|
||||
}
|
||||
|
||||
impl super::View for ScrollStickTo {
|
||||
fn ui(&mut self, ui: &mut Ui) {
|
||||
ui.label("Rows enter from the bottom, we want the scroll handle to start and stay at bottom unless moved");
|
||||
|
||||
Reference in New Issue
Block a user