diff --git a/lib/config-file/src/layered_load/ser.rs b/lib/config-file/src/layered_load/ser.rs index a81ff2d065..01e7ff1f4f 100644 --- a/lib/config-file/src/layered_load/ser.rs +++ b/lib/config-file/src/layered_load/ser.rs @@ -90,7 +90,7 @@ impl Serializer { } } -impl<'a> ser::Serializer for &'a mut Serializer { +impl ser::Serializer for &mut Serializer { type Ok = (); type Error = SerializerError; @@ -258,7 +258,7 @@ impl<'a> ser::Serializer for &'a mut Serializer { } } -impl<'a> ser::SerializeSeq for &'a mut Serializer { +impl ser::SerializeSeq for &mut Serializer { type Ok = (); type Error = SerializerError; @@ -279,7 +279,7 @@ impl<'a> ser::SerializeSeq for &'a mut Serializer { } } -impl<'a> ser::SerializeTuple for &'a mut Serializer { +impl ser::SerializeTuple for &mut Serializer { type Ok = (); type Error = SerializerError; @@ -292,7 +292,7 @@ impl<'a> ser::SerializeTuple for &'a mut Serializer { } } -impl<'a> ser::SerializeTupleStruct for &'a mut Serializer { +impl ser::SerializeTupleStruct for &mut Serializer { type Ok = (); type Error = SerializerError; @@ -305,7 +305,7 @@ impl<'a> ser::SerializeTupleStruct for &'a mut Serializer { } } -impl<'a> ser::SerializeTupleVariant for &'a mut Serializer { +impl ser::SerializeTupleVariant for &mut Serializer { type Ok = (); type Error = SerializerError; @@ -318,7 +318,7 @@ impl<'a> ser::SerializeTupleVariant for &'a mut Serializer { } } -impl<'a> ser::SerializeMap for &'a mut Serializer { +impl ser::SerializeMap for &mut Serializer { type Ok = (); type Error = SerializerError; @@ -343,7 +343,7 @@ impl<'a> ser::SerializeMap for &'a mut Serializer { } } -impl<'a> ser::SerializeStruct for &'a mut Serializer { +impl ser::SerializeStruct for &mut Serializer { type Ok = (); type Error = SerializerError; @@ -371,7 +371,7 @@ impl<'a> ser::SerializeStruct for &'a mut Serializer { } } -impl<'a> ser::SerializeStructVariant for &'a mut Serializer { +impl ser::SerializeStructVariant for &mut Serializer { type Ok = (); type Error = SerializerError; @@ -396,7 +396,7 @@ struct MapKeySerializer<'a> { ser: &'a mut Serializer, } -impl<'a> MapKeySerializer<'a> { +impl MapKeySerializer<'_> { fn push_key(&mut self, key: &str) { if !self.ser.key.is_empty() { self.ser.key.push('.'); @@ -405,7 +405,7 @@ impl<'a> MapKeySerializer<'a> { } } -impl<'a> ser::Serializer for MapKeySerializer<'a> { +impl ser::Serializer for MapKeySerializer<'_> { type Ok = (); type Error = SerializerError; diff --git a/lib/dal-test/src/lib.rs b/lib/dal-test/src/lib.rs index 10022bb0ad..0ec4ade01c 100644 --- a/lib/dal-test/src/lib.rs +++ b/lib/dal-test/src/lib.rs @@ -132,7 +132,7 @@ impl fmt::Debug for DalContextHead { /// To use mutably borrowed `DalContext` version, use [`DalContextHeadMutRef`]. pub struct DalContextHeadRef<'a>(pub &'a DalContext); -impl<'a> fmt::Debug for DalContextHeadRef<'a> { +impl fmt::Debug for DalContextHeadRef<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("DalContextHeadRef").finish_non_exhaustive() } @@ -145,7 +145,7 @@ impl<'a> fmt::Debug for DalContextHeadRef<'a> { /// To use a borrowed `DalContext` version, use [`DalContextHeadRef`]. pub struct DalContextHeadMutRef<'a>(pub &'a mut DalContext); -impl<'a> fmt::Debug for DalContextHeadMutRef<'a> { +impl fmt::Debug for DalContextHeadMutRef<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("DalContextHeadMutRef") .finish_non_exhaustive() diff --git a/lib/dal/src/change_set.rs b/lib/dal/src/change_set.rs index bc27dda0e4..ee7f3e6f4e 100644 --- a/lib/dal/src/change_set.rs +++ b/lib/dal/src/change_set.rs @@ -266,7 +266,7 @@ impl ChangeSet { if let Some(merge_requested_by) = self.merge_requested_by_user_id { User::get_by_pk(ctx, merge_requested_by).await?.map(|user| { if user.name().is_empty() { - return user.email().clone(); + user.email().clone() } else { user.name().clone() } @@ -278,7 +278,7 @@ impl ChangeSet { let reviewed_by_user = if let Some(reviewed_by) = self.reviewed_by_user_id { User::get_by_pk(ctx, reviewed_by).await?.map(|user| { if user.name().is_empty() { - return user.email().clone(); + user.email().clone() } else { user.name().clone() } diff --git a/lib/dal/src/secret/view.rs b/lib/dal/src/secret/view.rs index c01bfbf514..dfe951bdd5 100644 --- a/lib/dal/src/secret/view.rs +++ b/lib/dal/src/secret/view.rs @@ -16,7 +16,6 @@ pub enum SecretViewError { } #[allow(missing_docs)] - pub type SecretViewResult = Result; /// A [`view`](SecretView) of a corresponding [`Secret`]. diff --git a/lib/dal/src/workspace_snapshot.rs b/lib/dal/src/workspace_snapshot.rs index f1f5376cc4..1b853d66b6 100644 --- a/lib/dal/src/workspace_snapshot.rs +++ b/lib/dal/src/workspace_snapshot.rs @@ -264,7 +264,7 @@ struct SnapshotWriteGuard<'a> { working_copy_write_guard: RwLockWriteGuard<'a, Option>, } -impl<'a> std::ops::Deref for SnapshotReadGuard<'a> { +impl std::ops::Deref for SnapshotReadGuard<'_> { type Target = WorkspaceSnapshotGraphVCurrent; fn deref(&self) -> &Self::Target { @@ -277,7 +277,7 @@ impl<'a> std::ops::Deref for SnapshotReadGuard<'a> { } } -impl<'a> std::ops::Deref for SnapshotWriteGuard<'a> { +impl std::ops::Deref for SnapshotWriteGuard<'_> { type Target = WorkspaceSnapshotGraphVCurrent; fn deref(&self) -> &Self::Target { @@ -288,7 +288,7 @@ impl<'a> std::ops::Deref for SnapshotWriteGuard<'a> { } } -impl<'a> std::ops::DerefMut for SnapshotWriteGuard<'a> { +impl std::ops::DerefMut for SnapshotWriteGuard<'_> { fn deref_mut(&mut self) -> &mut Self::Target { let option: &mut Option = &mut self.working_copy_write_guard; @@ -306,7 +306,7 @@ pub struct InferredConnectionsWriteGuard<'a> { inferred_connection_graph: RwLockWriteGuard<'a, Option>, } -impl<'a> std::ops::Deref for InferredConnectionsReadGuard<'a> { +impl std::ops::Deref for InferredConnectionsReadGuard<'_> { type Target = InferredConnectionGraph; fn deref(&self) -> &Self::Target { @@ -317,7 +317,7 @@ impl<'a> std::ops::Deref for InferredConnectionsReadGuard<'a> { } } -impl<'a> std::ops::Deref for InferredConnectionsWriteGuard<'a> { +impl std::ops::Deref for InferredConnectionsWriteGuard<'_> { type Target = InferredConnectionGraph; fn deref(&self) -> &Self::Target { @@ -328,7 +328,7 @@ impl<'a> std::ops::Deref for InferredConnectionsWriteGuard<'a> { } } -impl<'a> std::ops::DerefMut for InferredConnectionsWriteGuard<'a> { +impl std::ops::DerefMut for InferredConnectionsWriteGuard<'_> { fn deref_mut(&mut self) -> &mut Self::Target { let maybe: &mut Option = &mut self.inferred_connection_graph; &mut *maybe diff --git a/lib/naxum-api-types/src/content_info.rs b/lib/naxum-api-types/src/content_info.rs index 6371a6e65b..39e927bc77 100644 --- a/lib/naxum-api-types/src/content_info.rs +++ b/lib/naxum-api-types/src/content_info.rs @@ -36,7 +36,7 @@ pub struct ContentInfo<'a> { pub message_version: MessageVersion, } -impl<'a> ContentInfo<'a> { +impl ContentInfo<'_> { /// Injects the content information into NATS message headers. pub fn inject_into_headers(&self, headers: &mut HeaderMap) { headers.insert(NATS_HEADER_CONTENT_TYPE_NAME, self.content_type.as_str()); @@ -89,7 +89,7 @@ where #[derive(Clone, Debug, Eq, PartialEq)] pub struct ContentType<'a>(Cow<'a, str>); -impl<'a> ContentType<'a> { +impl ContentType<'_> { /// Returns the interior data as a borrowed string. pub fn as_str(&self) -> &str { self.0.as_ref() diff --git a/lib/object-tree/src/graph.rs b/lib/object-tree/src/graph.rs index 083d0cc93b..c1b9f5e488 100644 --- a/lib/object-tree/src/graph.rs +++ b/lib/object-tree/src/graph.rs @@ -247,7 +247,7 @@ impl<'a, T> NodeWithEntriesRef<'a, T> { } } -impl<'a, T> WriteBytes for NodeWithEntriesRef<'a, T> +impl WriteBytes for NodeWithEntriesRef<'_, T> where T: WriteBytes, { diff --git a/lib/sdf-server/src/service/diagram/delete_connection.rs b/lib/sdf-server/src/service/diagram/delete_connection.rs index 3cac93b4b8..44c67b63e5 100644 --- a/lib/sdf-server/src/service/diagram/delete_connection.rs +++ b/lib/sdf-server/src/service/diagram/delete_connection.rs @@ -18,7 +18,6 @@ use si_events::audit_log::AuditLogKind; #[derive(Deserialize, Serialize, Debug)] #[serde(rename_all = "camelCase")] - pub struct DeleteConnectionRequest { pub from_socket_id: OutputSocketId, pub from_component_id: ComponentId, diff --git a/lib/sdf-server/src/service/v2/func/get_code.rs b/lib/sdf-server/src/service/v2/func/get_code.rs index 4dc6f55f5c..64e94e49b1 100644 --- a/lib/sdf-server/src/service/v2/func/get_code.rs +++ b/lib/sdf-server/src/service/v2/func/get_code.rs @@ -11,12 +11,11 @@ use crate::extract::{AccessBuilder, HandlerContext, PosthogClient}; use super::{get_code_response, FuncAPIResult}; -#[derive(Deserialize, Serialize, Debug)] -#[serde(rename_all = "camelCase")] - // TODO: find the right way to pass a Vec // the API call uses the `id[]=<...>&id[]=<...?` format // but that doesn't work here with Rust +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] pub struct GetRequest { pub id: FuncId, } diff --git a/lib/si-data-pg/src/lib.rs b/lib/si-data-pg/src/lib.rs index cc39673b07..6beee0f018 100644 --- a/lib/si-data-pg/src/lib.rs +++ b/lib/si-data-pg/src/lib.rs @@ -2068,7 +2068,7 @@ impl<'a> InstrumentedTransaction<'a> { net.transport = %self.metadata.net_transport, ) )] - pub fn client(&'a self) -> &Client { + pub fn client(&'a self) -> &'a Client { let span = current_span_for_instrument_at!("debug"); span.follows_from(&self.tx_span); @@ -2076,7 +2076,7 @@ impl<'a> InstrumentedTransaction<'a> { } } -impl<'a> fmt::Debug for InstrumentedTransaction<'a> { +impl fmt::Debug for InstrumentedTransaction<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("InstrumentedTransaction") .field("metadata", &self.metadata) @@ -2201,7 +2201,7 @@ impl<'a> InstrumentedTransactionBuilder<'a> { } } -impl<'a> fmt::Debug for InstrumentedTransactionBuilder<'a> { +impl fmt::Debug for InstrumentedTransactionBuilder<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("InstrumentedTransactionBuilder") .field("metadata", &self.metadata) diff --git a/lib/si-events-rs/src/rebase_batch_address.rs b/lib/si-events-rs/src/rebase_batch_address.rs index 99b0c4f224..398abbb4ba 100644 --- a/lib/si-events-rs/src/rebase_batch_address.rs +++ b/lib/si-events-rs/src/rebase_batch_address.rs @@ -50,7 +50,7 @@ impl Serialize for RebaseBatchAddress { struct RebaseBatchAddressVisitor; -impl<'de> Visitor<'de> for RebaseBatchAddressVisitor { +impl Visitor<'_> for RebaseBatchAddressVisitor { type Value = RebaseBatchAddress; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/lib/si-events-rs/src/vector_clock_id.rs b/lib/si-events-rs/src/vector_clock_id.rs index 540b5c1f8e..71a2989ce6 100644 --- a/lib/si-events-rs/src/vector_clock_id.rs +++ b/lib/si-events-rs/src/vector_clock_id.rs @@ -11,7 +11,7 @@ pub struct VectorClockId { pub struct VectorClockIdStringDeserializeVisitor; -impl<'de> serde::de::Visitor<'de> for VectorClockIdStringDeserializeVisitor { +impl serde::de::Visitor<'_> for VectorClockIdStringDeserializeVisitor { type Value = VectorClockId; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/lib/si-events-rs/src/workspace_snapshot_address.rs b/lib/si-events-rs/src/workspace_snapshot_address.rs index efce3be3b1..eb85bebb50 100644 --- a/lib/si-events-rs/src/workspace_snapshot_address.rs +++ b/lib/si-events-rs/src/workspace_snapshot_address.rs @@ -50,7 +50,7 @@ impl Serialize for WorkspaceSnapshotAddress { struct WorkspaceSnapshotAddressVisitor; -impl<'de> Visitor<'de> for WorkspaceSnapshotAddressVisitor { +impl Visitor<'_> for WorkspaceSnapshotAddressVisitor { type Value = WorkspaceSnapshotAddress; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/lib/si-hash/src/lib.rs b/lib/si-hash/src/lib.rs index bbf7a8db89..9435630a28 100644 --- a/lib/si-hash/src/lib.rs +++ b/lib/si-hash/src/lib.rs @@ -86,7 +86,7 @@ impl Serialize for Hash { struct HashVisitor; -impl<'de> Visitor<'de> for HashVisitor { +impl Visitor<'_> for HashVisitor { type Value = Hash; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/lib/si-id/src/ulid.rs b/lib/si-id/src/ulid.rs index 7df7c491ad..de455e009d 100644 --- a/lib/si-id/src/ulid.rs +++ b/lib/si-id/src/ulid.rs @@ -34,7 +34,7 @@ impl Ulid { struct UlidVisitor; -impl<'de> ::serde::de::Visitor<'de> for UlidVisitor { +impl ::serde::de::Visitor<'_> for UlidVisitor { type Value = Ulid; fn expecting(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { diff --git a/lib/si-pkg/src/pkg.rs b/lib/si-pkg/src/pkg.rs index 782d5d1f80..5585cc2d8d 100644 --- a/lib/si-pkg/src/pkg.rs +++ b/lib/si-pkg/src/pkg.rs @@ -324,7 +324,7 @@ impl<'a> Source<'a> { } } -impl<'a> fmt::Debug for Source<'a> { +impl fmt::Debug for Source<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Source") .field("graph", &"...") diff --git a/lib/si-pkg/src/pkg/variant.rs b/lib/si-pkg/src/pkg/variant.rs index 2100c73fde..91ac5b723f 100644 --- a/lib/si-pkg/src/pkg/variant.rs +++ b/lib/si-pkg/src/pkg/variant.rs @@ -196,7 +196,7 @@ impl<'a> SiPkgSchemaVariant<'a> { source: Source<'a>, node_idx: NodeIndex, parent_info: Option, - ) -> PkgResult)>> + ) -> PkgResult, Option)>> where I: ToOwned + Clone, { diff --git a/lib/si-pool-noodle/src/pool_noodle.rs b/lib/si-pool-noodle/src/pool_noodle.rs index 8c271bc64a..63fa343842 100644 --- a/lib/si-pool-noodle/src/pool_noodle.rs +++ b/lib/si-pool-noodle/src/pool_noodle.rs @@ -1,3 +1,43 @@ +//! [`pool_noodle`] implementations. +//! +//! --------------------------------------------------------------------- +//! --------------------------------------------------------------------- +//! ---------------------------:::::::::::::::::::::--------------------- +//! ---------------------:::::::::::::::::::::-------::::::-------------- +//! -----------------:::::::::::::::::::==========------::::::----------- +//! ----#*+#-----::::::::::::::::::::::::---:::--==++++-:::::::::-------- +//! ---+#%@@#----::::::::::::::::::===========++++***#*=::::::::::::----- +//! --=+*@@@@@*::::::::::::::::::::========++++****###*=::::::::::::::--- +//! --=@@@@@@@@%+::::::::::::::::::-=======+++++**###%#+:::::::::::::::-- +//! ----=@@@@@@@@%=:::::::::::::::::=========++++*###%#+-:::::::::::::::: +//! ------#@@@@@@@@%-:::::::::::::::-....:===:....:*#%#+-:::::::::::::::: +//! -----:::#@@@@@@@@%-::::::::::::..:-=.::+.:=**:-==%#*=:::::::::::::::: +//! ----::::::%@@@@@@@@%=::::::::::.-#%@@--=.#%@@#*#*%%*=:::::::::::::::: +//! ---:::::::::@@@@@@@@@%=::::::..:-*@@***#+-+####*%%%#+:::::::::::::::: +//! -:::::::::::%@@@@@@@@@@%#:.......+***#%%###**#%%%%%#+:::::::::::::::: +//! :::::::::::*#**#@@@@@@@@@%:......=+*#%%%%%@%#%%%%%%#*-::::::::::::::: +//! ::::::::::#@*+**%@@@@@@@@@=......:++*******####%%%%%*=::::::::::::::: +//! :::::::::::=%##%@@@#%@%@@+........++++******###%%%%%*=::::::::::::::: +//! :::::::::::=+*#@@%#%%%%@*.........++++++*****###%%%%#+.:::::::::::::: +//! ::::::::::=++===+*%*===+=.........++++++*****####%%%#**=::::::::::::: +//! :::::::::===++++*#@*+++**=........-+++++******###%%%%#%###*-::::::::: +//! ::::::::-++===*%@@@@%%%##:........++++++******###%%%%%%%###**+::::::: +//! :::::::::*%***%@@@@@%%%#:.......=+=+++++******####%%%%#%###****+::::: +//! ::::::::::*@@@@@@@%%%%%#......-+==+++*********####%%%%+:.=##****+-::: +//! :::::::::::::%@@@-%%%%%#*:.:++++++************####%%%%+::::-***+**-:: +//! --::::::::::::::::-#%%%###********#-**********####%%%#*.:::::**++**-: +//! --::::::::::::::::::*#%%%#######*:..**********####%%%#*.:::::=*++**=: +//! ---:::::::::::::::::::-#%%###*-.....**********#####%%##::::::=*++**+: +//! ---::::::::::::::::::::::::::.......+*********#####%%%#-:::::+++**#=: +//! ---::::::::::::::::::::::::::::.....-********######%%%#+::::*++**##:: +//! ----:::::::::::::::::::::::::::::::::#*******######%%%#*****++**##=:: +//! ------::::::::::::::::::::::::::::::.********######%%%%##**+***#%=::: +//! ---------::::::::::::::::::::::::::::********######%%%%%*****##%-:::: +//! ---------::::::::::::::::::::::::::::+*******######%%%%%#**##%=:::--- +//! ----------:::::::::::::::::::::::::::-#*****#######%%%%%-:+#=::::---- +//! :------------:::::::::::::::::::::::::##****#######%%%%%+:::::::----- +//! =:----------::::::::::::::::::::::::::*#***########%%%%%*::::::------ + use crate::lifeguard::LifeGuard; use crate::task::{PoolNoodleTask, PoolNoodleTaskType}; use crossbeam_queue::ArrayQueue; @@ -17,46 +57,6 @@ use tracing::{debug, info, warn}; use crate::errors::PoolNoodleError; use crate::{Instance, Spec}; -/// [`pool_noodle`] implementations. - -///--------------------------------------------------------------------- -///--------------------------------------------------------------------- -///---------------------------:::::::::::::::::::::--------------------- -///---------------------:::::::::::::::::::::-------::::::-------------- -///-----------------:::::::::::::::::::==========------::::::----------- -///----#*+#-----::::::::::::::::::::::::---:::--==++++-:::::::::-------- -///---+#%@@#----::::::::::::::::::===========++++***#*=::::::::::::----- -///--=+*@@@@@*::::::::::::::::::::========++++****###*=::::::::::::::--- -///--=@@@@@@@@%+::::::::::::::::::-=======+++++**###%#+:::::::::::::::-- -///----=@@@@@@@@%=:::::::::::::::::=========++++*###%#+-:::::::::::::::: -///------#@@@@@@@@%-:::::::::::::::-....:===:....:*#%#+-:::::::::::::::: -///-----:::#@@@@@@@@%-::::::::::::..:-=.::+.:=**:-==%#*=:::::::::::::::: -///----::::::%@@@@@@@@%=::::::::::.-#%@@--=.#%@@#*#*%%*=:::::::::::::::: -///---:::::::::@@@@@@@@@%=::::::..:-*@@***#+-+####*%%%#+:::::::::::::::: -///-:::::::::::%@@@@@@@@@@%#:.......+***#%%###**#%%%%%#+:::::::::::::::: -///:::::::::::*#**#@@@@@@@@@%:......=+*#%%%%%@%#%%%%%%#*-::::::::::::::: -///::::::::::#@*+**%@@@@@@@@@=......:++*******####%%%%%*=::::::::::::::: -///:::::::::::=%##%@@@#%@%@@+........++++******###%%%%%*=::::::::::::::: -///:::::::::::=+*#@@%#%%%%@*.........++++++*****###%%%%#+.:::::::::::::: -///::::::::::=++===+*%*===+=.........++++++*****####%%%#**=::::::::::::: -///:::::::::===++++*#@*+++**=........-+++++******###%%%%#%###*-::::::::: -///::::::::-++===*%@@@@%%%##:........++++++******###%%%%%%%###**+::::::: -///:::::::::*%***%@@@@@%%%#:.......=+=+++++******####%%%%#%###****+::::: -///::::::::::*@@@@@@@%%%%%#......-+==+++*********####%%%%+:.=##****+-::: -///:::::::::::::%@@@-%%%%%#*:.:++++++************####%%%%+::::-***+**-:: -///--::::::::::::::::-#%%%###********#-**********####%%%#*.:::::**++**-: -///--::::::::::::::::::*#%%%#######*:..**********####%%%#*.:::::=*++**=: -///---:::::::::::::::::::-#%%###*-.....**********#####%%##::::::=*++**+: -///---::::::::::::::::::::::::::.......+*********#####%%%#-:::::+++**#=: -///---::::::::::::::::::::::::::::.....-********######%%%#+::::*++**##:: -///----:::::::::::::::::::::::::::::::::#*******######%%%#*****++**##=:: -///------::::::::::::::::::::::::::::::.********######%%%%##**+***#%=::: -///---------::::::::::::::::::::::::::::********######%%%%%*****##%-:::: -///---------::::::::::::::::::::::::::::+*******######%%%%%#**##%=:::--- -///----------:::::::::::::::::::::::::::-#*****#######%%%%%-:+#=::::---- -///:------------:::::::::::::::::::::::::##****#######%%%%%+:::::::----- -///=:----------::::::::::::::::::::::::::*#***########%%%%%*::::::------ - type Result = result::Result>; #[derive(Clone, Debug)] diff --git a/lib/si-std/src/canonical_file.rs b/lib/si-std/src/canonical_file.rs index c59217c4f2..56b765d75d 100644 --- a/lib/si-std/src/canonical_file.rs +++ b/lib/si-std/src/canonical_file.rs @@ -168,11 +168,9 @@ pub fn safe_canonically_join( })?; match canonicalized.file_name() { - None => { - return Err(CanonicalFileError::NoFileNameAfterJoin( - full_path.as_os_str().to_string_lossy().to_string(), - )) - } + None => Err(CanonicalFileError::NoFileNameAfterJoin( + full_path.as_os_str().to_string_lossy().to_string(), + )), Some(file_name) => Ok(dir_path.join(file_name)), } } diff --git a/lib/telemetry-http-rs/src/propagation.rs b/lib/telemetry-http-rs/src/propagation.rs index f98a7542cf..4cb600df54 100644 --- a/lib/telemetry-http-rs/src/propagation.rs +++ b/lib/telemetry-http-rs/src/propagation.rs @@ -63,7 +63,7 @@ mod headers { pub struct HeaderInjector<'a>(pub &'a mut http::HeaderMap); - impl<'a> Injector for HeaderInjector<'a> { + impl Injector for HeaderInjector<'_> { /// Set a key and value in the HeaderMap. Does nothing if the key or value are not valid inputs. fn set(&mut self, key: &str, value: String) { if let Ok(name) = http::header::HeaderName::from_bytes(key.as_bytes()) { @@ -76,7 +76,7 @@ mod headers { pub struct HeaderExtractor<'a>(pub &'a http::HeaderMap); - impl<'a> Extractor for HeaderExtractor<'a> { + impl Extractor for HeaderExtractor<'_> { /// Get a value for a key from the HeaderMap. If the value is not valid ASCII, returns None. fn get(&self, key: &str) -> Option<&str> { self.0.get(key).and_then(|value| value.to_str().ok()) diff --git a/lib/telemetry-nats-rs/src/propagation.rs b/lib/telemetry-nats-rs/src/propagation.rs index a9b1ce0523..2ff36d2fb9 100644 --- a/lib/telemetry-nats-rs/src/propagation.rs +++ b/lib/telemetry-nats-rs/src/propagation.rs @@ -55,7 +55,7 @@ mod headers { pub struct HeaderInjector<'a>(pub &'a mut HeaderMap); - impl<'a> Injector for HeaderInjector<'a> { + impl Injector for HeaderInjector<'_> { /// Set a key and value in the HeaderMap. Does nothing if the key or value are not valid inputs. fn set(&mut self, key: &str, value: String) { if let Ok(name) = HeaderName::from_str(key) { @@ -68,7 +68,7 @@ mod headers { pub struct HeaderExtractor<'a>(pub &'a HeaderMap); - impl<'a> Extractor for HeaderExtractor<'a> { + impl Extractor for HeaderExtractor<'_> { /// Get a value for a key from the HeaderMap. If the value is not valid ASCII, returns None. fn get(&self, key: &str) -> Option<&str> { self.0.get(key).map(>::as_ref)