1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-26 03:27:30 +00:00

fix: Fixups for #138 (#343)

- Fix unused imports in unit tests
- Add accidently remove module "battery"
This commit is contained in:
谢祯晖 2019-09-11 20:43:40 +08:00 committed by Matan Kushner
parent 54793c7d5a
commit 37b5168bfe
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,4 @@
use ansi_term::Color;
use chrono::offset::TimeZone;
use chrono::{DateTime, Local};
use super::{Context, Module};
@ -51,6 +50,7 @@ tests become extra important */
#[cfg(test)]
mod tests {
use super::*;
use chrono::offset::TimeZone;
const FMT_12: &str = "%r";
const FMT_24: &str = "%T";
@ -97,6 +97,7 @@ mod tests {
assert_eq!(formatted, "15:36:47");
}
#[test]
fn test_format_with_paren() {
let time = Local.ymd(2014, 7, 8).and_hms(15, 36, 47);
let formatted = format_time("[%T]", time);

View File

@ -29,6 +29,7 @@ const DEFAULT_PROMPT_ORDER: &[&str] = &[
"line_break",
"jobs",
#[cfg(feature = "battery")]
"battery",
"time",
"character",
];