Fix indentation and formatting

This commit is contained in:
spikecodes 2021-11-23 22:23:29 -08:00
parent 6d73024183
commit 85ae7c1f60
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
7 changed files with 27 additions and 43 deletions

View file

@ -632,27 +632,12 @@ pub async fn error(req: Request<Body>, msg: String) -> Result<Response<Body>, St
mod tests {
use super::format_num;
#[test]
fn format_num_works() {
assert_eq!(
format_num(567),
("567".to_string(), "567".to_string())
);
assert_eq!(
format_num(1234),
("1.2k".to_string(), "1234".to_string())
);
assert_eq!(
format_num(1999),
("2.0k".to_string(), "1999".to_string())
);
assert_eq!(
format_num(1001),
("1.0k".to_string(), "1001".to_string())
);
assert_eq!(
format_num(1_999_999),
("2.0m".to_string(), "1999999".to_string())
);
}
}
#[test]
fn format_num_works() {
assert_eq!(format_num(567), ("567".to_string(), "567".to_string()));
assert_eq!(format_num(1234), ("1.2k".to_string(), "1234".to_string()));
assert_eq!(format_num(1999), ("2.0k".to_string(), "1999".to_string()));
assert_eq!(format_num(1001), ("1.0k".to_string(), "1001".to_string()));
assert_eq!(format_num(1_999_999), ("2.0m".to_string(), "1999999".to_string()));
}
}