mirror of
https://github.com/starship/starship
synced 2024-11-02 12:57:23 +00:00
refactor: latest suggestions from Clippy
This commit is contained in:
parent
c04a0eb1d1
commit
5b14f21394
1 changed files with 2 additions and 2 deletions
|
@ -40,10 +40,10 @@ pub fn get_prompt(context: Context) -> String {
|
||||||
for module in printable {
|
for module in printable {
|
||||||
// Skip printing the prefix of a module after the line_break
|
// Skip printing the prefix of a module after the line_break
|
||||||
if print_without_prefix {
|
if print_without_prefix {
|
||||||
let module_without_prefix = module.to_string_without_prefix(context.shell.clone());
|
let module_without_prefix = module.to_string_without_prefix(context.shell);
|
||||||
write!(buf, "{}", module_without_prefix).unwrap()
|
write!(buf, "{}", module_without_prefix).unwrap()
|
||||||
} else {
|
} else {
|
||||||
let module = module.ansi_strings_for_shell(context.shell.clone());
|
let module = module.ansi_strings_for_shell(context.shell);
|
||||||
write!(buf, "{}", ANSIStrings(&module)).unwrap();
|
write!(buf, "{}", ANSIStrings(&module)).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue