diff --git a/crates/compose/src/lib.rs b/crates/compose/src/lib.rs index a9ee43fce7..4138799953 100644 --- a/crates/compose/src/lib.rs +++ b/crates/compose/src/lib.rs @@ -26,8 +26,8 @@ use wac_graph::{CompositionGraph, NodeId}; /// dependent component. Finally, the composer will export all exports from the /// dependent component to its dependents. The composer will then encode the /// composition graph into a byte array and return it. -pub async fn compose<'a, L: ComponentSourceLoader>( - loader: &'a L, +pub async fn compose( + loader: &L, component: &LockedComponent, ) -> Result, ComposeError> { Composer::new(loader).compose(component).await diff --git a/crates/doctor/src/lib.rs b/crates/doctor/src/lib.rs index 9a9b60dd22..1e40fe6a13 100644 --- a/crates/doctor/src/lib.rs +++ b/crates/doctor/src/lib.rs @@ -13,7 +13,7 @@ pub mod manifest; /// Diagnose for Rust-specific problems. pub mod rustlang; /// Test helpers. -pub mod test; +pub(crate) mod test; /// Diagnoses for Wasm source problems. pub mod wasm; diff --git a/crates/expressions/src/lib.rs b/crates/expressions/src/lib.rs index 23be70b654..14bb9b1c46 100644 --- a/crates/expressions/src/lib.rs +++ b/crates/expressions/src/lib.rs @@ -277,7 +277,7 @@ impl<'a> TryFrom<&'a str> for Key<'a> { } } -impl<'a> AsRef for Key<'a> { +impl AsRef for Key<'_> { fn as_ref(&self) -> &str { self.0 } diff --git a/crates/factor-outbound-http/src/wasi.rs b/crates/factor-outbound-http/src/wasi.rs index a8602498f1..6a4dc1d635 100644 --- a/crates/factor-outbound-http/src/wasi.rs +++ b/crates/factor-outbound-http/src/wasi.rs @@ -60,7 +60,7 @@ pub(crate) struct WasiHttpImplInner<'a> { table: &'a mut ResourceTable, } -impl<'a> WasiHttpView for WasiHttpImplInner<'a> { +impl WasiHttpView for WasiHttpImplInner<'_> { fn ctx(&mut self) -> &mut WasiHttpCtx { &mut self.state.wasi_http_ctx } diff --git a/crates/factor-wasi/src/lib.rs b/crates/factor-wasi/src/lib.rs index 612123b6a5..353691a7c0 100644 --- a/crates/factor-wasi/src/lib.rs +++ b/crates/factor-wasi/src/lib.rs @@ -155,7 +155,7 @@ pub struct MountFilesContext<'a> { ctx: &'a mut WasiCtxBuilder, } -impl<'a> MountFilesContext<'a> { +impl MountFilesContext<'_> { pub fn preopened_dir( &mut self, host_path: impl AsRef, @@ -284,7 +284,7 @@ struct WasiImplInner<'a> { table: &'a mut ResourceTable, } -impl<'a> WasiView for WasiImplInner<'a> { +impl WasiView for WasiImplInner<'_> { fn ctx(&mut self) -> &mut WasiCtx { self.ctx } diff --git a/crates/factors-executor/src/lib.rs b/crates/factors-executor/src/lib.rs index eac07e20eb..7b379d0762 100644 --- a/crates/factors-executor/src/lib.rs +++ b/crates/factors-executor/src/lib.rs @@ -191,7 +191,7 @@ pub struct FactorsInstanceBuilder<'a, F: RuntimeFactors, U> { factors: &'a F, } -impl<'a, T: RuntimeFactors, U> FactorsInstanceBuilder<'a, T, U> { +impl FactorsInstanceBuilder<'_, T, U> { /// Returns the app component for the instance. pub fn app_component(&self) -> &AppComponent { &self.app_component @@ -223,7 +223,7 @@ impl<'a, T: RuntimeFactors, U> FactorsInstanceBuilder<'a, T, U> { } } -impl<'a, T: RuntimeFactors, U: Send> FactorsInstanceBuilder<'a, T, U> { +impl FactorsInstanceBuilder<'_, T, U> { /// Instantiates the instance with the given executor instance state pub async fn instantiate( self, diff --git a/crates/oci/src/client.rs b/crates/oci/src/client.rs index 459ee4a5c0..6f38255197 100644 --- a/crates/oci/src/client.rs +++ b/crates/oci/src/client.rs @@ -884,6 +884,7 @@ mod test { // Convenience wrapper for deserializing from literal JSON #[macro_export] + #[allow(missing_docs)] // it's test-only, but rust-analyzer gets mad macro_rules! from_json { ($($json:tt)+) => { serde_json::from_value(serde_json::json!($($json)+)).expect("valid json") diff --git a/crates/plugins/src/manager.rs b/crates/plugins/src/manager.rs index b9c1bfa2d2..7b1e34eb94 100644 --- a/crates/plugins/src/manager.rs +++ b/crates/plugins/src/manager.rs @@ -326,7 +326,7 @@ pub enum PluginManagerUpdateGuard<'lock> { Failed, // See comment on PluginManagerUpdateLock } -impl<'lock> PluginManagerUpdateGuard<'lock> { +impl PluginManagerUpdateGuard<'_> { pub fn denied(&self) -> bool { matches!(self, Self::Denied) } diff --git a/crates/telemetry/src/propagation.rs b/crates/telemetry/src/propagation.rs index 203962d6b9..ba1975d899 100644 --- a/crates/telemetry/src/propagation.rs +++ b/crates/telemetry/src/propagation.rs @@ -27,7 +27,7 @@ pub enum HeaderInjector<'a> { Http1(&'a mut http1::HeaderMap), } -impl<'a> Injector for HeaderInjector<'a> { +impl Injector for HeaderInjector<'_> { fn set(&mut self, key: &str, value: String) { match self { HeaderInjector::Http0(headers) => { @@ -77,7 +77,7 @@ pub enum HeaderExtractor<'a> { Http1(&'a http1::HeaderMap), } -impl<'a> Extractor for HeaderExtractor<'a> { +impl Extractor for HeaderExtractor<'_> { fn get(&self, key: &str) -> Option<&str> { match self { HeaderExtractor::Http0(headers) => { diff --git a/src/commands/up/app_source.rs b/src/commands/up/app_source.rs index 7969106992..29088f0ddd 100644 --- a/src/commands/up/app_source.rs +++ b/src/commands/up/app_source.rs @@ -84,6 +84,7 @@ impl std::fmt::Display for AppSource { /// This represents a "partially loaded" source which has enough information to /// dispatch to the correct trigger executor but hasn't (necessarily) gone /// through full validation / loading yet. +#[allow(clippy::large_enum_variant)] // allow because the large variant is the common one pub enum ResolvedAppSource { File { manifest_path: PathBuf,