Skip to content

Commit

Permalink
🚨 Avoid unnecessary closure
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Dec 11, 2024
1 parent cf6ba0d commit 581424e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/terminal-colorsaurus/src/xterm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn parse_response(response: Vec<u8>, prefix: &[u8]) -> Result<Color> {
.strip_prefix(prefix)
.and_then(|r| r.strip_suffix(ST).or(r.strip_suffix(&[BEL])))
.and_then(xparsecolor)
.ok_or_else(|| Error::Parse(response))
.ok_or(Error::Parse(response))
}

type Reader<'a> = BufReader<TermReader<RawModeGuard<'a>>>;
Expand Down

0 comments on commit 581424e

Please sign in to comment.