diff --git a/src/api/msn/parse.rs b/src/api/msn/parse.rs index 321c6d7..0a7f19b 100644 --- a/src/api/msn/parse.rs +++ b/src/api/msn/parse.rs @@ -30,7 +30,6 @@ pub(crate) fn parse_fundamentals_from_str( #[cfg(test)] mod tests { use super::{parse_fundamentals_from_str, parse_quote_from_str}; - use crate::api::types::Period; #[test] fn parses_quote_fixture_json() { diff --git a/src/cache.rs b/src/cache.rs index 737cf9b..db35df6 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -275,7 +275,9 @@ mod tests { assert!(path.exists(), "corrupted file should exist before get()"); // get() should return Ok(None), not an error - let result: Option = cache.get("quote", "CORRUPT.JK").expect("get should not error"); + let result: Option = cache + .get("quote", "CORRUPT.JK") + .expect("get should not error"); assert_eq!(result, None, "corrupted entry should be treated as miss"); // The corrupted file should be deleted @@ -294,7 +296,10 @@ mod tests { } fs::write(&path, "{ not valid json at all").expect("write corrupted cache"); - assert!(path.exists(), "corrupted file should exist before get_stale()"); + assert!( + path.exists(), + "corrupted file should exist before get_stale()" + ); // get_stale() should return Ok(None), not an error let result: Option = cache