From 6edbb0acc0251fdca984f55d6242b19ef45cb552 Mon Sep 17 00:00:00 2001 From: hatoo Date: Wed, 27 Nov 2024 16:35:18 +0900 Subject: [PATCH] clippy --- src/client.rs | 2 +- src/pcg64si.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client.rs b/src/client.rs index 087abeb9..0f7e3460 100644 --- a/src/client.rs +++ b/src/client.rs @@ -319,7 +319,7 @@ impl Client { } pub fn generate_url(&self, rng: &mut Pcg64Si) -> Result<(Cow, Pcg64Si), ClientError> { - let snapshot = rng.clone(); + let snapshot = *rng; Ok((self.url_generator.generate(rng)?, snapshot)) } diff --git a/src/pcg64si.rs b/src/pcg64si.rs index 02f64cbe..558d0dad 100644 --- a/src/pcg64si.rs +++ b/src/pcg64si.rs @@ -29,7 +29,8 @@ impl RngCore for Pcg64Si { } fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error> { - Ok(self.fill_bytes(dest)) + self.fill_bytes(dest); + Ok(()) } }