Skip to content

Commit 2fe6c19

Browse files
committed
use rustversion to gate core::error
1 parent 71fc02f commit 2fe6c19

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313

1414
### Added
1515

16-
* `impl core::error::Error for Error`
16+
* `impl core::error::Error for Error` on rust >= 1.81
1717

1818
## [v0.6.0] - 2024-08-30
1919

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ readme = "README.md"
1111
[dependencies]
1212
embedded-io = "0.6.1"
1313
noline = { version = "0.5.0", optional = true }
14+
rustversion = "1.0.17"
1415

1516
[features]
1617
default = ["echo"]
17-
error-in-core = [] # requires rust 1.81.0
1818
echo = []
1919

2020
[dev-dependencies]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl core::fmt::Display for Error {
133133
}
134134
}
135135

136-
#[cfg(feature = "error-in-core")]
136+
#[rustversion::since(1.81)]
137137
impl core::error::Error for Error {}
138138

139139
/// Looks for the named parameter in the parameter list of the item, then

0 commit comments

Comments
 (0)