Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions egui_plot/src/items/line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ impl HLine {

/// Stroke width. A high value means the plot thickens.
#[inline]
pub fn width(mut self, width: impl Into<f32>) -> Self {
self.stroke.width = width.into();
pub fn width(mut self, width: f32) -> Self {
self.stroke.width = width;
self
}

Expand Down Expand Up @@ -180,8 +180,8 @@ impl VLine {

/// Stroke width. A high value means the plot thickens.
#[inline]
pub fn width(mut self, width: impl Into<f32>) -> Self {
self.stroke.width = width.into();
pub fn width(mut self, width: f32) -> Self {
self.stroke.width = width;
self
}

Expand Down
8 changes: 4 additions & 4 deletions egui_plot/src/items/points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ impl<'a> Points<'a> {
/// Whether to add stems between the markers and a horizontal reference
/// line.
#[inline]
pub fn stems(mut self, y_reference: impl Into<f32>) -> Self {
self.stems = Some(y_reference.into());
pub fn stems(mut self, y_reference: f32) -> Self {
self.stems = Some(y_reference);
self
}

/// Set the maximum extent of the marker around its position, in ui points.
#[inline]
pub fn radius(mut self, radius: impl Into<f32>) -> Self {
self.radius = radius.into();
pub fn radius(mut self, radius: f32) -> Self {
self.radius = radius;
self
}

Expand Down
4 changes: 2 additions & 2 deletions egui_plot/src/items/polygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ impl<'a> Polygon<'a> {

/// Set the stroke width.
#[inline]
pub fn width(mut self, width: impl Into<f32>) -> Self {
self.stroke.width = width.into();
pub fn width(mut self, width: f32) -> Self {
self.stroke.width = width;
self
}

Expand Down
12 changes: 6 additions & 6 deletions egui_plot/src/items/series.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ impl<'a> Line<'a> {

/// Stroke width. A high value means the plot thickens.
#[inline]
pub fn width(mut self, width: impl Into<f32>) -> Self {
self.stroke.width = width.into();
pub fn width(mut self, width: f32) -> Self {
self.stroke.width = width;
self
}

Expand All @@ -96,15 +96,15 @@ impl<'a> Line<'a> {

/// Fill the area between this line and a given horizontal reference line.
#[inline]
pub fn fill(mut self, y_reference: impl Into<f32>) -> Self {
self.fill = Some(y_reference.into());
pub fn fill(mut self, y_reference: f32) -> Self {
self.fill = Some(y_reference);
self
}

/// Set the fill area's alpha channel. Default is `0.05`.
#[inline]
pub fn fill_alpha(mut self, alpha: impl Into<f32>) -> Self {
self.fill_alpha = alpha.into();
pub fn fill_alpha(mut self, alpha: f32) -> Self {
self.fill_alpha = alpha;
self
}

Expand Down
4 changes: 2 additions & 2 deletions egui_plot/src/items/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ impl Span {

/// Convenience for updating the span border width.
#[inline]
pub fn border_width(mut self, width: impl Into<f32>) -> Self {
self.border_stroke.width = width.into();
pub fn border_width(mut self, width: f32) -> Self {
self.border_stroke.width = width;
self
}

Expand Down
Loading