Skip to content

Commit 6571862

Browse files
authored
Merge pull request #3001 from itowlson/lints-and-fmts-and-analyses-1.84
New clippies and rust-analyzer chores for Rust 1.84
2 parents c879cd4 + e239b68 commit 6571862

File tree

10 files changed

+14
-12
lines changed

10 files changed

+14
-12
lines changed

crates/compose/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ use wac_graph::{CompositionGraph, NodeId};
2626
/// dependent component. Finally, the composer will export all exports from the
2727
/// dependent component to its dependents. The composer will then encode the
2828
/// composition graph into a byte array and return it.
29-
pub async fn compose<'a, L: ComponentSourceLoader>(
30-
loader: &'a L,
29+
pub async fn compose<L: ComponentSourceLoader>(
30+
loader: &L,
3131
component: &LockedComponent,
3232
) -> Result<Vec<u8>, ComposeError> {
3333
Composer::new(loader).compose(component).await

crates/doctor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub mod manifest;
1313
/// Diagnose for Rust-specific problems.
1414
pub mod rustlang;
1515
/// Test helpers.
16-
pub mod test;
16+
pub(crate) mod test;
1717
/// Diagnoses for Wasm source problems.
1818
pub mod wasm;
1919

crates/expressions/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl<'a> TryFrom<&'a str> for Key<'a> {
277277
}
278278
}
279279

280-
impl<'a> AsRef<str> for Key<'a> {
280+
impl AsRef<str> for Key<'_> {
281281
fn as_ref(&self) -> &str {
282282
self.0
283283
}

crates/factor-outbound-http/src/wasi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub(crate) struct WasiHttpImplInner<'a> {
6060
table: &'a mut ResourceTable,
6161
}
6262

63-
impl<'a> WasiHttpView for WasiHttpImplInner<'a> {
63+
impl WasiHttpView for WasiHttpImplInner<'_> {
6464
fn ctx(&mut self) -> &mut WasiHttpCtx {
6565
&mut self.state.wasi_http_ctx
6666
}

crates/factor-wasi/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ pub struct MountFilesContext<'a> {
155155
ctx: &'a mut WasiCtxBuilder,
156156
}
157157

158-
impl<'a> MountFilesContext<'a> {
158+
impl MountFilesContext<'_> {
159159
pub fn preopened_dir(
160160
&mut self,
161161
host_path: impl AsRef<Path>,
@@ -284,7 +284,7 @@ struct WasiImplInner<'a> {
284284
table: &'a mut ResourceTable,
285285
}
286286

287-
impl<'a> WasiView for WasiImplInner<'a> {
287+
impl WasiView for WasiImplInner<'_> {
288288
fn ctx(&mut self) -> &mut WasiCtx {
289289
self.ctx
290290
}

crates/factors-executor/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ pub struct FactorsInstanceBuilder<'a, F: RuntimeFactors, U> {
191191
factors: &'a F,
192192
}
193193

194-
impl<'a, T: RuntimeFactors, U> FactorsInstanceBuilder<'a, T, U> {
194+
impl<T: RuntimeFactors, U> FactorsInstanceBuilder<'_, T, U> {
195195
/// Returns the app component for the instance.
196196
pub fn app_component(&self) -> &AppComponent {
197197
&self.app_component
@@ -223,7 +223,7 @@ impl<'a, T: RuntimeFactors, U> FactorsInstanceBuilder<'a, T, U> {
223223
}
224224
}
225225

226-
impl<'a, T: RuntimeFactors, U: Send> FactorsInstanceBuilder<'a, T, U> {
226+
impl<T: RuntimeFactors, U: Send> FactorsInstanceBuilder<'_, T, U> {
227227
/// Instantiates the instance with the given executor instance state
228228
pub async fn instantiate(
229229
self,

crates/oci/src/client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ mod test {
884884

885885
// Convenience wrapper for deserializing from literal JSON
886886
#[macro_export]
887+
#[allow(missing_docs)] // it's test-only, but rust-analyzer gets mad
887888
macro_rules! from_json {
888889
($($json:tt)+) => {
889890
serde_json::from_value(serde_json::json!($($json)+)).expect("valid json")

crates/plugins/src/manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ pub enum PluginManagerUpdateGuard<'lock> {
326326
Failed, // See comment on PluginManagerUpdateLock
327327
}
328328

329-
impl<'lock> PluginManagerUpdateGuard<'lock> {
329+
impl PluginManagerUpdateGuard<'_> {
330330
pub fn denied(&self) -> bool {
331331
matches!(self, Self::Denied)
332332
}

crates/telemetry/src/propagation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub enum HeaderInjector<'a> {
2727
Http1(&'a mut http1::HeaderMap),
2828
}
2929

30-
impl<'a> Injector for HeaderInjector<'a> {
30+
impl Injector for HeaderInjector<'_> {
3131
fn set(&mut self, key: &str, value: String) {
3232
match self {
3333
HeaderInjector::Http0(headers) => {
@@ -77,7 +77,7 @@ pub enum HeaderExtractor<'a> {
7777
Http1(&'a http1::HeaderMap),
7878
}
7979

80-
impl<'a> Extractor for HeaderExtractor<'a> {
80+
impl Extractor for HeaderExtractor<'_> {
8181
fn get(&self, key: &str) -> Option<&str> {
8282
match self {
8383
HeaderExtractor::Http0(headers) => {

src/commands/up/app_source.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ impl std::fmt::Display for AppSource {
8484
/// This represents a "partially loaded" source which has enough information to
8585
/// dispatch to the correct trigger executor but hasn't (necessarily) gone
8686
/// through full validation / loading yet.
87+
#[allow(clippy::large_enum_variant)] // allow because the large variant is the common one
8788
pub enum ResolvedAppSource {
8889
File {
8990
manifest_path: PathBuf,

0 commit comments

Comments
 (0)