Skip to content

Commit 12b25dd

Browse files
authored
rust 1.80 ci fixes (iqlusioninc#568)
This fixes CI for rust 1.80. This effectively adds support for backtrace which came in rust 1.65 (MSRV is currently 1.70).
1 parent b5ae19f commit 12b25dd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/error.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Error types
22
33
use std::{
4+
backtrace::Backtrace,
45
fmt::{self, Debug, Display},
56
ops::Deref,
67
};
@@ -59,7 +60,6 @@ where
5960
source: Option<BoxError>,
6061

6162
/// Backtrace where error occurred
62-
#[cfg(feature = "backtrace")]
6363
backtrace: Option<Backtrace>,
6464
}
6565

@@ -72,8 +72,7 @@ where
7272
Context {
7373
kind,
7474
source,
75-
#[cfg(feature = "backtrace")]
76-
backtrace: Some(Backtrace::new()),
75+
backtrace: Some(Backtrace::capture()),
7776
}
7877
}
7978

@@ -83,7 +82,6 @@ where
8382
}
8483

8584
/// Get the backtrace associated with this error (if available)
86-
#[cfg(feature = "backtrace")]
8785
pub fn backtrace(&self) -> Option<&Backtrace> {
8886
self.backtrace.as_ref()
8987
}

0 commit comments

Comments
 (0)