From 2d4a225e2a799051d717805e51779c7e0936f0fc Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sun, 17 Nov 2019 09:06:00 +1300 Subject: [PATCH] Fix formatting --- src/cli.rs | 11 +++++++---- src/shell/helper.rs | 11 +++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 3e01b19709..f5488a8e70 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -398,10 +398,13 @@ pub async fn cli() -> Result<(), Box> { let prompt = { #[cfg(feature = "starship-prompt")] { - let bytes = strip_ansi_escapes::strip(&starship::print::get_prompt(starship::context::Context::new_with_dir( - clap::ArgMatches::default(), - cwd.clone(), - ))).unwrap(); + let bytes = strip_ansi_escapes::strip(&starship::print::get_prompt( + starship::context::Context::new_with_dir( + clap::ArgMatches::default(), + cwd.clone(), + ), + )) + .unwrap(); String::from_utf8_lossy(&bytes).to_string() } diff --git a/src/shell/helper.rs b/src/shell/helper.rs index 3352469068..7e662a7dd5 100644 --- a/src/shell/helper.rs +++ b/src/shell/helper.rs @@ -19,7 +19,10 @@ pub(crate) struct Helper { impl Helper { pub(crate) fn new(context: Context) -> Helper { - Helper { context, colored_prompt: String::new() } + Helper { + context, + colored_prompt: String::new(), + } } } @@ -42,7 +45,11 @@ impl Hinter for Helper { } impl Highlighter for Helper { - fn highlight_prompt<'b, 's: 'b, 'p: 'b>(&'s self, prompt: &'p str, default: bool) -> Cow<'b, str> { + fn highlight_prompt<'b, 's: 'b, 'p: 'b>( + &'s self, + prompt: &'p str, + default: bool, + ) -> Cow<'b, str> { use std::borrow::Cow::Borrowed; if default {