Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Use associated function syntax for Debug and Display backtrace impl #279

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
language: rust
rust:
- 1.18.0
- 1.25.0
- stable
- beta
- nightly
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -15,7 +15,7 @@ path = "./failure_derive"

[dependencies.backtrace]
optional = true
version = "0.3.3"
version = "0.3.13"

[workspace]
members = [".", "failure_derive"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -100,8 +100,8 @@ pub fn read_toolchains(path: PathBuf) -> Result<Toolchains, Error>
## Requirements

Both failure and failure_derive are intended to compile on all stable versions
of Rust newer than 1.18.0, as well as the latest beta and the latest nightly.
If either crate fails to compile on any version newer than 1.18.0, please open
of Rust newer than 1.25.0, as well as the latest beta and the latest nightly.
If either crate fails to compile on any version newer than 1.25.0, please open
an issue.

failure is **no_std** compatible, though some aspects of it (primarily the
Expand Down
4 changes: 2 additions & 2 deletions src/backtrace/mod.rs
Expand Up @@ -129,15 +129,15 @@ with_backtrace! {
impl Debug for Backtrace {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if let Some(bt) = self.internal.as_backtrace() {
bt.fmt(f)
Debug::fmt(bt, f)
} else { Ok(()) }
}
}

impl Display for Backtrace {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if let Some(bt) = self.internal.as_backtrace() {
bt.fmt(f)
Debug::fmt(bt, f)
} else { Ok(()) }
}
}
Expand Down