Skip to content

fix compiler warnings in nightly #3208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl<'a> AppComponent<'a> {

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

Expand Down
2 changes: 1 addition & 1 deletion crates/componentize/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static EXPORT_INTERFACES: &[(&str, &str)] = &[
("handle-http-request", "inbound-http"),
];

pub fn componentize_if_necessary(module_or_component: &[u8]) -> Result<Cow<[u8]>> {
pub fn componentize_if_necessary(module_or_component: &[u8]) -> Result<Cow<'_, [u8]>> {
for payload in Parser::new(0).parse_all(module_or_component) {
if let Payload::Version { encoding, .. } = payload.context("unable to parse binary")? {
return match encoding {
Expand Down
2 changes: 1 addition & 1 deletion crates/componentize/src/module_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl ModuleInfo {

/// Returns the wit-bindgen metadata producers processed-by field, if
/// present.
pub fn bindgen_processors(&self) -> Option<wasm_metadata::ProducersField> {
pub fn bindgen_processors(&self) -> Option<wasm_metadata::ProducersField<'_>> {
self.bindgen
.as_ref()?
.producers
Expand Down
2 changes: 1 addition & 1 deletion crates/doctor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Checkup {
}

/// Returns the next detected problem.
pub async fn next_diagnosis(&mut self) -> Result<Option<PatientDiagnosis>> {
pub async fn next_diagnosis(&mut self) -> Result<Option<PatientDiagnosis<'_>>> {
while self.unprocessed_diagnoses.is_empty() {
let Some(diagnostic) = self.diagnostics.pop_front() else {
return Ok(None);
Expand Down
2 changes: 1 addition & 1 deletion crates/expressions/src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Template {
self.parts.iter().all(|p| matches!(p, Part::Lit(_)))
}

pub(crate) fn parts(&self) -> std::slice::Iter<Part> {
pub(crate) fn parts(&self) -> std::slice::Iter<'_, Part> {
self.parts.iter()
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/factors-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl<T: RuntimeFactors, U: Send + 'static> FactorsExecutorApp<T, U> {
}

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

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

Expand Down
2 changes: 1 addition & 1 deletion crates/factors/src/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<'a, T: RuntimeFactors, F: Factor> PrepareContext<'a, T, F> {
}

/// Get the app component.
pub fn app_component(&self) -> &'a AppComponent {
pub fn app_component(&self) -> &'a AppComponent<'_> {
self.app_component
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl watchexec::handler::Handler<watchexec::action::Action> for NotifyOnFileChan
_ = self.notifier.send(Uuid::new_v4());
}
action.outcome(watchexec::action::Outcome::DoNothing);
Ok::<(), Box<(dyn std::error::Error + 'static)>>(())
Ok::<(), Box<dyn std::error::Error + 'static>>(())
}
}

Expand Down
Loading