Skip to content

Commit eb6544e

Browse files
committed
Error feature flag to tide MSRV concerns for now
1 parent c993dd1 commit eb6544e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ exclude = ["target/*", "Cargo.lock", "scripts/tmp", "*.txt", "tests/*"]
3737
version = "1"
3838
features = ["alloc"]
3939

40-
4140
[features]
4241
default = ["std"]
43-
std = []
42+
std = ["error"]
43+
error = []

src/quick_check.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ use crate::stream_safe;
33
use crate::tables;
44
use crate::UnicodeNormalization;
55

6+
#[cfg(all(feature = "error", not(feature = "std")))]
67
use core::error::Error;
8+
#[cfg(feature = "std")]
9+
use std::error::Error;
10+
711
use core::fmt;
812

913
/// Error returned when a string is not properly normalized.
@@ -27,6 +31,7 @@ impl fmt::Display for NormalizationError {
2731
)
2832
}
2933
}
34+
#[cfg(feature = "error")]
3035
impl Error for NormalizationError {}
3136

3237
/// Whether additional checking is necessary to verify normalization.

0 commit comments

Comments
 (0)