Skip to content

Commit 2e182b5

Browse files
committed
Remove backtrace cfg that would always error if enabled
1 parent c83c605 commit 2e182b5

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ members = [
6363

6464
[workspace.lints.rust]
6565
# FIXME(CraftSpider): Switch from error-chain to a newer package, as it's a deprecated project
66-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(backtrace)', 'cfg(has_error_description_deprecated)'] }
66+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(has_error_description_deprecated)'] }
6767
missing_docs = "deny"
6868

6969
[lib]

src/errors.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,6 @@ impl<T: std::error::Error + 'static> SyncError<T> {
324324
}
325325

326326
impl<T: std::error::Error + 'static> std::error::Error for SyncError<T> {
327-
#[cfg(backtrace)]
328-
fn backtrace(&self) -> Option<&Backtrace> {}
329-
330327
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
331328
self.proxy.as_ref().map(|e| e as _)
332329
}
@@ -389,9 +386,6 @@ impl<T: std::error::Error> CauseProxy<T> {
389386
}
390387

391388
impl<T: std::error::Error + 'static> std::error::Error for CauseProxy<T> {
392-
#[cfg(backtrace)]
393-
fn backtrace(&self) -> Option<&Backtrace> {}
394-
395389
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
396390
self.next.as_ref().map(|e| e as _)
397391
}

0 commit comments

Comments
 (0)