mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
style: use inline format args (clippy::uninlined_format_args) (#6734)
use inline format args (clippy::uninlined_format_args) Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
This commit is contained in:
@@ -123,7 +123,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
}
|
||||
}
|
||||
Err(error) => {
|
||||
log::warn!("Error in module `git_status`:\n{}", error);
|
||||
log::warn!("Error in module `git_status`:\n{error}");
|
||||
return None;
|
||||
}
|
||||
});
|
||||
@@ -676,7 +676,7 @@ fn git_status_wsl(context: &Context, conf: &GitStatusConfig) -> Option<String> {
|
||||
log::Level::Error
|
||||
};
|
||||
|
||||
log::log!(level, "Failed to get Windows path:\n{:?}", e);
|
||||
log::log!(level, "Failed to get Windows path:\n{e:?}");
|
||||
|
||||
return None;
|
||||
}
|
||||
@@ -685,13 +685,13 @@ fn git_status_wsl(context: &Context, conf: &GitStatusConfig) -> Option<String> {
|
||||
let winpath = match std::str::from_utf8(&winpath.stdout) {
|
||||
Ok(r) => r.trim_end(),
|
||||
Err(e) => {
|
||||
log::error!("Failed to parse Windows path:\n{:?}", e);
|
||||
log::error!("Failed to parse Windows path:\n{e:?}");
|
||||
|
||||
return None;
|
||||
}
|
||||
};
|
||||
|
||||
log::trace!("Windows path: {}", winpath);
|
||||
log::trace!("Windows path: {winpath}");
|
||||
|
||||
// In Windows or Linux dir?
|
||||
if winpath.starts_with(r"\\wsl") {
|
||||
@@ -723,7 +723,7 @@ fn git_status_wsl(context: &Context, conf: &GitStatusConfig) -> Option<String> {
|
||||
let out = match exe {
|
||||
Ok(r) => r,
|
||||
Err(e) => {
|
||||
log::error!("Failed to run Git Status module on Windows:\n{}", e);
|
||||
log::error!("Failed to run Git Status module on Windows:\n{e}");
|
||||
|
||||
return None;
|
||||
}
|
||||
@@ -732,10 +732,7 @@ fn git_status_wsl(context: &Context, conf: &GitStatusConfig) -> Option<String> {
|
||||
match String::from_utf8(out.stdout) {
|
||||
Ok(r) => Some(r),
|
||||
Err(e) => {
|
||||
log::error!(
|
||||
"Failed to parse Windows Git Status module status output:\n{}",
|
||||
e
|
||||
);
|
||||
log::error!("Failed to parse Windows Git Status module status output:\n{e}");
|
||||
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user