add a Backtrace::disabled function
This commit is contained in:
parent
1fa54ad968
commit
8561b67b6f
1 changed files with 6 additions and 0 deletions
|
@ -291,6 +291,12 @@ impl Backtrace {
|
|||
Backtrace::create(Backtrace::force_capture as usize)
|
||||
}
|
||||
|
||||
/// Forcibly captures a disabled backtrace, regardless of environment
|
||||
/// variable configuration.
|
||||
pub fn disabled() -> Backtrace {
|
||||
Backtrace { inner: Inner::Disabled };
|
||||
}
|
||||
|
||||
// Capture a backtrace which start just before the function addressed by
|
||||
// `ip`
|
||||
fn create(ip: usize) -> Backtrace {
|
||||
|
|
Loading…
Reference in a new issue