From efddcc9a1d377f85e334a6be841d74e73b462cf7 Mon Sep 17 00:00:00 2001 From: JackKCWong Date: Sat, 10 Feb 2024 08:47:27 +0800 Subject: [PATCH] fix format --- src/plot/xy.rs | 7 ++++++- src/stats/mod.rs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plot/xy.rs b/src/plot/xy.rs index e6f56b5..6e1a6e3 100644 --- a/src/plot/xy.rs +++ b/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) -> 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 } diff --git a/src/stats/mod.rs b/src/stats/mod.rs index 495503d..78e7f16 100644 --- a/src/stats/mod.rs +++ b/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() {