Skip to content

Commit

Permalink
Merge pull request #267 from dtolnay/demand
Browse files Browse the repository at this point in the history
Rename &mut Demand arguments to 'demand'
  • Loading branch information
dtolnay authored Aug 31, 2022
2 parents 2c8f71b + 1b298fe commit 007c69c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const PROBE: &str = r#"
}
impl Error for E {
fn provide<'a>(&'a self, req: &mut Demand<'a>) {
req.provide_ref(&self.backtrace);
fn provide<'a>(&'a self, demand: &mut Demand<'a>) {
demand.provide_ref(&self.backtrace);
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ where
}

#[cfg(backtrace)]
fn provide<'a>(&'a self, req: &mut Demand<'a>) {
self.error.provide(req);
fn provide<'a>(&'a self, demand: &mut Demand<'a>) {
self.error.provide(demand);
}
}

Expand All @@ -142,9 +142,9 @@ where
}

#[cfg(backtrace)]
fn provide<'a>(&'a self, req: &mut Demand<'a>) {
req.provide_ref(self.error.backtrace());
self.error.provide(req);
fn provide<'a>(&'a self, demand: &mut Demand<'a>) {
demand.provide_ref(self.error.backtrace());
self.error.provide(demand);
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,11 @@ impl ErrorImpl {
}

#[cfg(backtrace)]
unsafe fn provide<'a>(this: Ref<'a, Self>, req: &mut Demand<'a>) {
unsafe fn provide<'a>(this: Ref<'a, Self>, demand: &mut Demand<'a>) {
if let Some(backtrace) = &this.deref().backtrace {
req.provide_ref(backtrace);
demand.provide_ref(backtrace);
}
Self::error(this).provide(req);
Self::error(this).provide(demand);
}

#[cold]
Expand All @@ -918,8 +918,8 @@ where
}

#[cfg(backtrace)]
fn provide<'a>(&'a self, req: &mut Demand<'a>) {
unsafe { ErrorImpl::provide(self.erase(), req) }
fn provide<'a>(&'a self, demand: &mut Demand<'a>) {
unsafe { ErrorImpl::provide(self.erase(), demand) }
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl StdError for BoxedError {
}

#[cfg(backtrace)]
fn provide<'a>(&'a self, req: &mut Demand<'a>) {
self.0.provide(req);
fn provide<'a>(&'a self, demand: &mut Demand<'a>) {
self.0.provide(demand);
}
}

0 comments on commit 007c69c

Please sign in to comment.