1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 21:00:03 -04:00

plot: Resolve check.sh warnings

This commit is contained in:
JohannesProgrammiert
2023-05-26 11:22:59 +02:00
parent 68834dec8f
commit 3d8fd1443a
2 changed files with 7 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ pub(super) const Y_AXIS: usize = 1;
///
/// `Default` means bottom for x-axis and left for y-axis.
/// `Opposite` means top for x-axis and right for y-axis.
#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Placement {
Default,
Opposite,
@@ -75,8 +75,8 @@ impl<const AXIS: usize> Default for AxisHints<AXIS> {
/// maximum `digits` on tick label is 5
fn default() -> Self {
let label = match AXIS {
X_AXIS => "x".to_string(),
Y_AXIS => "y".to_string(),
X_AXIS => "x".to_owned(),
Y_AXIS => "y".to_owned(),
_ => unreachable!(),
};
Self {

View File

@@ -551,17 +551,17 @@ impl CustomAxisDemo {
let x_axes = vec![
XAxisHints::default()
.label("Time".to_string())
.label("Time".to_owned())
.formatter(x_fmt),
XAxisHints::default().label("Value".to_string()),
XAxisHints::default().label("Value".to_owned()),
];
let y_axes = vec![
YAxisHints::default()
.label("Percent".to_string())
.label("Percent".to_owned())
.formatter(y_fmt)
.max_digits(4),
YAxisHints::default()
.label("Absolute".to_string())
.label("Absolute".to_owned())
.placement(Placement::Opposite),
];
Plot::new("custom_axes")