From 4e79cf3886270c70437d9a68cef909b89b06b497 Mon Sep 17 00:00:00 2001 From: Ross MacArthur Date: Tue, 4 Oct 2022 00:10:18 +0200 Subject: [PATCH] Fix clippy warnings --- examples/replace.rs | 2 +- generate/src/unicode.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/replace.rs b/examples/replace.rs index d2b524d..e2d204d 100644 --- a/examples/replace.rs +++ b/examples/replace.rs @@ -17,7 +17,7 @@ fn main() -> io::Result<()> { io::stdin().read_to_string(&mut buf)?; buf }; - replace(&*stdin, BufWriter::new(io::stdout())) + replace(&stdin, BufWriter::new(io::stdout())) } fn replace(mut s: &str, mut o: impl Write) -> io::Result<()> { diff --git a/generate/src/unicode.rs b/generate/src/unicode.rs index c5d2870..3ddbf0c 100644 --- a/generate/src/unicode.rs +++ b/generate/src/unicode.rs @@ -170,7 +170,7 @@ impl Emoji { let skin_tones: Vec<_> = emoji .chars() .filter_map(|c| { - SkinTone::tones().find_map(|tone| (tone.code_point() == c).then(|| tone)) + SkinTone::tones().find_map(|tone| (tone.code_point() == c).then_some(tone)) }) .collect();