diff options
author | Marco Ieni <11428655+MarcoIeni@users.noreply.github.com> | 2020-11-06 00:12:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 18:12:27 -0500 |
commit | 3dac4f7fa6451c446902583d2d2aa1358960fe7c (patch) | |
tree | aa56fafc017bcea4346516400079234ee4a2bdae /src/ansi/mod.rs | |
parent | 8c8ddc8a815997250419594dd506bca6313433a6 (diff) |
fix some clippy warnings (#380)
Diffstat (limited to 'src/ansi/mod.rs')
-rw-r--r-- | src/ansi/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ansi/mod.rs b/src/ansi/mod.rs index e2fdaf7f..fc28fc9c 100644 --- a/src/ansi/mod.rs +++ b/src/ansi/mod.rs @@ -60,7 +60,7 @@ pub fn truncate_str<'a, 'b>(s: &'a str, display_width: usize, tail: &'b str) -> } } - return Cow::from(format!("{}{}", result, result_tail)); + Cow::from(format!("{}{}", result, result_tail)) } pub fn parse_first_style(s: &str) -> Option<ansi_term::Style> { @@ -72,7 +72,7 @@ pub fn parse_first_style(s: &str) -> Option<ansi_term::Style> { pub fn string_starts_with_ansi_style_sequence(s: &str) -> bool { AnsiElementIterator::new(s) - .nth(0) + .next() .map(|el| matches!(el, Element::CSI(_, _, _))) .unwrap_or(false) } |