Try again with math-like externals (#4629)

* Try again with math-like externals

* clippy 1.59

* clippy 1.59

* clippy 1.59
This commit is contained in:
JT
2022-02-24 14:02:28 -05:00
committed by GitHub
parent 2c9d8c4818
commit 3c62d27c28
21 changed files with 77 additions and 54 deletions

View File

@ -86,26 +86,26 @@ impl NushellPrompt {
impl Prompt for NushellPrompt {
fn render_prompt_left(&self) -> Cow<str> {
if let Some(prompt_string) = &self.left_prompt_string {
prompt_string.replace("\n", "\r\n").into()
prompt_string.replace('\n', "\r\n").into()
} else {
let default = DefaultPrompt::new();
default
.render_prompt_left()
.to_string()
.replace("\n", "\r\n")
.replace('\n', "\r\n")
.into()
}
}
fn render_prompt_right(&self) -> Cow<str> {
if let Some(prompt_string) = &self.right_prompt_string {
prompt_string.replace("\n", "\r\n").into()
prompt_string.replace('\n', "\r\n").into()
} else {
let default = DefaultPrompt::new();
default
.render_prompt_right()
.to_string()
.replace("\n", "\r\n")
.replace('\n', "\r\n")
.into()
}
}