Skip to content

Commit

Permalink
Merge pull request #281 from dtolnay/redundantprovide
Browse files Browse the repository at this point in the history
Remove redundant Backtrace provide_ref from ContextError
  • Loading branch information
dtolnay committed Oct 21, 2022
2 parents cccc785 + 0b42fed commit 6874b52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use core::convert::Infallible;
use core::fmt::{self, Debug, Display, Write};

#[cfg(backtrace)]
use std::any::Demand;
use std::any::{Demand, Provider};

mod ext {
use super::*;
Expand Down Expand Up @@ -159,8 +159,7 @@ where

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

Expand Down

0 comments on commit 6874b52

Please sign in to comment.