From 75a3c8ab2eca3370c70e64a945b38947e7aa7841 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 16 May 2024 17:41:34 -0700 Subject: [PATCH] base: fix clippy::multiple_bound_locations lint Merge the `where` clause bounds into the ones in the generic type definitions. This is also more consistent with the other functions in this file. BUG=b:344974550 TEST=tools/clippy Change-Id: Ie4d33ae0c204dab6279607aa0b181768b42c75eb Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5599145 Reviewed-by: Elie Kheirallah Commit-Queue: Daniel Verkamp --- base/src/custom_serde.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/base/src/custom_serde.rs b/base/src/custom_serde.rs index c2391f0441..94965486e2 100644 --- a/base/src/custom_serde.rs +++ b/base/src/custom_serde.rs @@ -19,14 +19,10 @@ use sync::Mutex; /// NOTE: This does not validate already serialized Mutexes and data. If multiple structs contain a /// clone of the Arc, and they are all being serialized, this will result in the same data being /// serialized, once per clone. -pub fn serialize_arc_mutex( +pub fn serialize_arc_mutex( item: &Arc>, serializer: S, -) -> Result -where - S: Serializer, - T: Serialize, -{ +) -> Result { let lock = item.lock(); serde::Serialize::serialize(&*lock, serializer) }