Skip to content

Commit 1f6a36d

Browse files
authored
Merge pull request #3208 from spinframework/fix-3177
fix compiler warnings in nightly
2 parents 10f7840 + 26a124d commit 1f6a36d

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

crates/app/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl<'a> AppComponent<'a> {
249249

250250
/// Returns an iterator of [`ContentPath`]s for this component's configured
251251
/// "directory mounts".
252-
pub fn files(&self) -> std::slice::Iter<ContentPath> {
252+
pub fn files(&self) -> std::slice::Iter<'_, ContentPath> {
253253
self.locked.files.iter()
254254
}
255255

crates/componentize/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static EXPORT_INTERFACES: &[(&str, &str)] = &[
3939
("handle-http-request", "inbound-http"),
4040
];
4141

42-
pub fn componentize_if_necessary(module_or_component: &[u8]) -> Result<Cow<[u8]>> {
42+
pub fn componentize_if_necessary(module_or_component: &[u8]) -> Result<Cow<'_, [u8]>> {
4343
for payload in Parser::new(0).parse_all(module_or_component) {
4444
if let Payload::Version { encoding, .. } = payload.context("unable to parse binary")? {
4545
return match encoding {

crates/componentize/src/module_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl ModuleInfo {
8383

8484
/// Returns the wit-bindgen metadata producers processed-by field, if
8585
/// present.
86-
pub fn bindgen_processors(&self) -> Option<wasm_metadata::ProducersField> {
86+
pub fn bindgen_processors(&self) -> Option<wasm_metadata::ProducersField<'_>> {
8787
self.bindgen
8888
.as_ref()?
8989
.producers

crates/doctor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Checkup {
5454
}
5555

5656
/// Returns the next detected problem.
57-
pub async fn next_diagnosis(&mut self) -> Result<Option<PatientDiagnosis>> {
57+
pub async fn next_diagnosis(&mut self) -> Result<Option<PatientDiagnosis<'_>>> {
5858
while self.unprocessed_diagnoses.is_empty() {
5959
let Some(diagnostic) = self.diagnostics.pop_front() else {
6060
return Ok(None);

crates/expressions/src/template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Template {
4646
self.parts.iter().all(|p| matches!(p, Part::Lit(_)))
4747
}
4848

49-
pub(crate) fn parts(&self) -> std::slice::Iter<Part> {
49+
pub(crate) fn parts(&self) -> std::slice::Iter<'_, Part> {
5050
self.parts.iter()
5151
}
5252
}

crates/factors-executor/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl<T: RuntimeFactors, U: Send + 'static> FactorsExecutorApp<T, U> {
158158
}
159159

160160
/// Returns an instance builder for the given component ID.
161-
pub fn prepare(&self, component_id: &str) -> anyhow::Result<FactorsInstanceBuilder<T, U>> {
161+
pub fn prepare(&self, component_id: &str) -> anyhow::Result<FactorsInstanceBuilder<'_, T, U>> {
162162
let app_component = self
163163
.configured_app
164164
.app()
@@ -204,7 +204,7 @@ pub struct FactorsInstanceBuilder<'a, F: RuntimeFactors, U: 'static> {
204204

205205
impl<T: RuntimeFactors, U: 'static> FactorsInstanceBuilder<'_, T, U> {
206206
/// Returns the app component for the instance.
207-
pub fn app_component(&self) -> &AppComponent {
207+
pub fn app_component(&self) -> &AppComponent<'_> {
208208
&self.app_component
209209
}
210210

crates/factors/src/prepare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl<'a, T: RuntimeFactors, F: Factor> PrepareContext<'a, T, F> {
6565
}
6666

6767
/// Get the app component.
68-
pub fn app_component(&self) -> &'a AppComponent {
68+
pub fn app_component(&self) -> &'a AppComponent<'_> {
6969
self.app_component
7070
}
7171

src/commands/watch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ impl watchexec::handler::Handler<watchexec::action::Action> for NotifyOnFileChan
338338
_ = self.notifier.send(Uuid::new_v4());
339339
}
340340
action.outcome(watchexec::action::Outcome::DoNothing);
341-
Ok::<(), Box<(dyn std::error::Error + 'static)>>(())
341+
Ok::<(), Box<dyn std::error::Error + 'static>>(())
342342
}
343343
}
344344

0 commit comments

Comments
 (0)