Skip to content

Commit 581424e

Browse files
committed
🚨 Avoid unnecessary closure
1 parent cf6ba0d commit 581424e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/terminal-colorsaurus/src/xterm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn parse_response(response: Vec<u8>, prefix: &[u8]) -> Result<Color> {
7575
.strip_prefix(prefix)
7676
.and_then(|r| r.strip_suffix(ST).or(r.strip_suffix(&[BEL])))
7777
.and_then(xparsecolor)
78-
.ok_or_else(|| Error::Parse(response))
78+
.ok_or(Error::Parse(response))
7979
}
8080

8181
type Reader<'a> = BufReader<TermReader<RawModeGuard<'a>>>;

0 commit comments

Comments
 (0)