From d52f8b7a494139111ad6ec07b946ba661d34852e Mon Sep 17 00:00:00 2001 From: Michael Krasnitski Date: Wed, 18 Oct 2023 21:33:03 -0400 Subject: [PATCH] Fix clippy --- src/json.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/json.rs b/src/json.rs index aa50a634305..1405a73d007 100644 --- a/src/json.rs +++ b/src/json.rs @@ -60,8 +60,7 @@ where } /// Deserialize an instance of type `T` from a string of JSON text. -#[cfg_attr(not(feature = "simd_json"), allow(unused_mut))] -#[allow(clippy::missing_errors_doc)] // It's obvious +#[allow(clippy::missing_errors_doc)] pub fn from_str(s: &str) -> Result where T: DeserializeOwned, @@ -74,6 +73,7 @@ where } /// Deserialize an instance of type `T` from bytes of JSON text. +#[allow(clippy::missing_errors_doc)] pub fn from_slice(v: &[u8]) -> Result where T: DeserializeOwned, @@ -88,6 +88,7 @@ where } /// Interpret a [`Value`] as an instance of type `T`. +#[allow(clippy::missing_errors_doc)] pub fn from_value(value: Value) -> Result where T: DeserializeOwned, @@ -100,6 +101,7 @@ where } /// Deserialize an instance of type `T` from bytes of JSON text. +#[allow(clippy::missing_errors_doc)] pub fn from_reader(rdr: R) -> Result where R: std::io::Read, @@ -113,6 +115,7 @@ where } /// Serialize the given data structure as a String of JSON. +#[allow(clippy::missing_errors_doc)] pub fn to_string(value: &T) -> Result where T: ?Sized + Serialize, @@ -125,6 +128,7 @@ where } /// Serialize the given data structure as a pretty-printed String of JSON. +#[allow(clippy::missing_errors_doc)] pub fn to_string_pretty(value: &T) -> Result where T: ?Sized + Serialize, @@ -137,6 +141,7 @@ where } /// Serialize the given data structure as a JSON byte vector. +#[allow(clippy::missing_errors_doc)] pub fn to_vec(value: &T) -> Result> where T: ?Sized + Serialize, @@ -149,6 +154,7 @@ where } /// Serialize the given data structure as a pretty-printed JSON byte vector. +#[allow(clippy::missing_errors_doc)] pub fn to_vec_pretty(value: &T) -> Result> where T: ?Sized + Serialize, @@ -161,6 +167,7 @@ where } /// Convert a `T` into a [`Value`] which is an enum that can represent any valid JSON data. +#[allow(clippy::missing_errors_doc)] pub fn to_value(value: T) -> Result where T: Serialize,