Browse Source

fix format

pull/59/head
JackKCWong 2 years ago
parent
commit
efddcc9a1d
  1. 7
      src/plot/xy.rs
  2. 2
      src/stats/mod.rs

7
src/plot/xy.rs

@ -33,7 +33,12 @@ impl XyPlot {
/// "None" is used, human units will be used, with an heuristic based on the
/// input data for deciding the units and the decimal places.
pub fn new(vec: &[f64], width: usize, height: usize, precision: Option<usize>) -> Self {
let mut plot = Self::new_with_stats(width, height, Stats::new(vec.to_vec().borrow_mut(), precision), precision);
let mut plot = Self::new_with_stats(
width,
height,
Stats::new(vec.to_vec().borrow_mut(), precision),
precision,
);
plot.load(vec);
plot
}

2
src/stats/mod.rs

@ -115,8 +115,8 @@ impl fmt::Display for Stats {
mod tests {
use super::*;
use float_eq::assert_float_eq;
use yansi::Paint;
use rand::{seq::SliceRandom, thread_rng};
use yansi::Paint;
#[test]
fn basic_test() {

Loading…
Cancel
Save