mirror of
https://github.com/starship/starship.git
synced 2024-11-22 00:04:05 +01:00
fix clippy
Signed-off-by: xxchan <xxchan22f@gmail.com>
This commit is contained in:
parent
095f2f2e6e
commit
e269bf0362
@ -392,7 +392,7 @@ fn format_rustc_version(rustc_version: &str, version_format: &str) -> Option<Str
|
||||
caps.name("date").map(|x| {
|
||||
let date = x.as_str();
|
||||
let date = chrono::NaiveDate::parse_from_str(date, "%Y-%m-%d")
|
||||
.expect(&format!("invalid date format: {date}"))
|
||||
.unwrap_or_else(|_| panic!("invalid date format: {date}"))
|
||||
+ chrono::Duration::days(1);
|
||||
format!("nightly-{}", date.format("%Y-%m-%d"))
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user