mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
plot-axes: Resolve ./scripts/check.sh warnings
This commit is contained in:
@@ -51,7 +51,7 @@ pub struct AxisHints<const AXIS: usize> {
|
||||
const LINE_HEIGHT: f32 = 12.0;
|
||||
|
||||
impl<const AXIS: usize> Default for AxisHints<AXIS> {
|
||||
/// Initializes a default axis configuration for the specified [`Axis`].
|
||||
/// Initializes a default axis configuration for the specified axis.
|
||||
///
|
||||
/// `label` is 'x' or 'y'
|
||||
/// `formatter` is default float to string formatter
|
||||
|
||||
@@ -570,7 +570,7 @@ impl Plot {
|
||||
/// If no x-axis has been specified so far a new one will be created.
|
||||
pub fn x_axis_label(mut self, label: impl Into<WidgetText>) -> Self {
|
||||
if self.x_axes.is_empty() {
|
||||
self.x_axes.push(XAxisHints::default().label(label))
|
||||
self.x_axes.push(XAxisHints::default().label(label));
|
||||
} else {
|
||||
self.x_axes[0].label = label.into();
|
||||
}
|
||||
@@ -581,7 +581,7 @@ impl Plot {
|
||||
/// If no y-axis has been specified so far a new one will be created.
|
||||
pub fn y_axis_label(mut self, label: impl Into<WidgetText>) -> Self {
|
||||
if self.y_axes.is_empty() {
|
||||
self.y_axes.push(YAxisHints::default().label(label))
|
||||
self.y_axes.push(YAxisHints::default().label(label));
|
||||
} else {
|
||||
self.y_axes[0].label = label.into();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user