Skip to content

Commit

Permalink
Method names for nostd version are the same now
Browse files Browse the repository at this point in the history
  • Loading branch information
uandere committed Oct 6, 2023
1 parent 5c54999 commit c5c8982
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,8 @@ pub enum Shape<'a> {
/// Provides an interface for drawing plots.
pub trait Plot<'a> {
/// Draws a [line chart](https://en.wikipedia.org/wiki/Line_chart) of points connected by straight line segments.
#[cfg(feature = "std")]
fn lineplot(&'a mut self, shape: &'a Shape) -> &'a mut Chart;

#[cfg(not(feature = "std"))]
fn lineplot_nostd(&'a mut self, shape: &'a Shape) -> &'a mut Chart;
}

/// Provides an interface for drawing colored plots.
Expand Down Expand Up @@ -542,7 +539,7 @@ impl<'a> Chart<'a> {
}

#[cfg(not(feature = "std"))]
pub fn figures_nostd(&mut self) {
pub fn figures(&mut self) {
for shape in &self.shapes {
let x_scale = Scale::new(self.xmin..self.xmax, 0.0..self.width as f32);
let y_scale = Scale::new(self.ymin..self.ymax, 0.0..self.height as f32);
Expand Down Expand Up @@ -655,7 +652,7 @@ impl<'a> Plot<'a> for Chart<'a> {
}

#[cfg(not(feature = "std"))]
fn lineplot_nostd(&'a mut self, shape: &'a Shape) -> &'a mut Chart {
fn lineplot(&'a mut self, shape: &'a Shape) -> &'a mut Chart {
self.shapes.push(shape);
if self.y_ranging == ChartRangeMethod::AutoRange {
self.rescale(shape);
Expand Down

0 comments on commit c5c8982

Please sign in to comment.