Skip to content
Myr

Merge pull request #267 from dtolnay/demand

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Rename &mut Demand arguments to 'demand'

authored by David Tolnay · committed by GitHub · parents 2c8f71b, 1b298fe · Browse files · 4 files+14 added−14 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+14 added−14 removed

  • other:+14 added−14 removed

4 files+14 added−14 removed

modified:src/context.rs+5 added-5 removed
126 unmodified lines
127 Some(&self.error)128 }129130 #[cfg(backtrace)]131 fn provide<'a>(&'a self, req: &mut Demand<'a>) {132 self.error.provide(req);131 fn provide<'a>(&'a self, demand: &mut Demand<'a>) {132 self.error.provide(demand);133 }134}135136impl<C> StdError for ContextError<C, Error>
4 unmodified lines
141 Some(unsafe { crate::ErrorImpl::error(self.error.inner.by_ref()) })142 }143144 #[cfg(backtrace)]145 fn provide<'a>(&'a self, req: &mut Demand<'a>) {146 req.provide_ref(self.error.backtrace());147 self.error.provide(req);145 fn provide<'a>(&'a self, demand: &mut Demand<'a>) {146 demand.provide_ref(self.error.backtrace());147 self.error.provide(demand);148 }149}150151struct Quoted<C>(C);
27 unmodified lines
modified:src/error.rs+5 added-5 removed
894 unmodified lines
895 .expect("backtrace capture failed")896 }897898 #[cfg(backtrace)]899 unsafe fn provide<'a>(this: Ref<'a, Self>, req: &mut Demand<'a>) {899 unsafe fn provide<'a>(this: Ref<'a, Self>, demand: &mut Demand<'a>) {900 if let Some(backtrace) = &this.deref().backtrace {901 req.provide_ref(backtrace);901 demand.provide_ref(backtrace);902 }903 Self::error(this).provide(req);903 Self::error(this).provide(demand);904 }905906 #[cold]907 pub(crate) unsafe fn chain(this: Ref<Self>) -> Chain {
9 unmodified lines
917 unsafe { ErrorImpl::error(self.erase()).source() }918 }919920 #[cfg(backtrace)]921 fn provide<'a>(&'a self, req: &mut Demand<'a>) {922 unsafe { ErrorImpl::provide(self.erase(), req) }921 fn provide<'a>(&'a self, demand: &mut Demand<'a>) {922 unsafe { ErrorImpl::provide(self.erase(), demand) }923 }924}925926impl<E> Debug for ErrorImpl<E>
54 unmodified lines
modified:src/wrapper.rs+2 added-2 removed
73 unmodified lines
74 self.0.source()75 }7677 #[cfg(backtrace)]78 fn provide<'a>(&'a self, req: &mut Demand<'a>) {79 self.0.provide(req);78 fn provide<'a>(&'a self, demand: &mut Demand<'a>) {79 self.0.provide(demand);80 }81}
modified:build.rs+2 added-2 removed
32 unmodified lines
33 }34 }3536 impl Error for E {37 fn provide<'a>(&'a self, req: &mut Demand<'a>) {38 req.provide_ref(&self.backtrace);37 fn provide<'a>(&'a self, demand: &mut Demand<'a>) {38 demand.provide_ref(&self.backtrace);39 }40 }4142 const _: fn() = || {
83 unmodified lines