Eliminate backtrace_if_absent in Error::context
Before adoption: this commit came in with the history the project adopted, so no landing records it.
This avoids stepping through the list of causes when adding context to the anyhow::Error type which is known to already hold a backtrace. Reduces the release-mode time of the following loop from 4 seconds to 4 milliseconds. let mut err = anyhow!("..."); for _ in 0..25000 { err = err.context("..."); }
authored by David Tolnay · committed by David Tolnay · parent 8885e93 · Browse files · 1 file+17 added−2 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+17 added−2 removed
- other:+17 added−2 removed