mirror of
https://github.com/starship/starship.git
synced 2024-11-23 00:33:16 +01:00
fix: Fix clippy
This commit is contained in:
parent
2fb052d68c
commit
3b459f4379
@ -94,9 +94,7 @@ impl<'a> StringFormatter<'a> {
|
||||
.flat_map(|style| match style {
|
||||
StyleElement::Text(text) => text.as_ref().chars(),
|
||||
StyleElement::Variable(name) => {
|
||||
let variable = variables
|
||||
.get(name.as_ref())
|
||||
.expect(&format!("Style variable {} not found in cache", &name));
|
||||
let variable = variables.get(name.as_ref()).unwrap_or(&None);
|
||||
match variable {
|
||||
Some(style_string) => style_string.chars(),
|
||||
None => "".chars(),
|
||||
|
Loading…
Reference in New Issue
Block a user