diff options
| author | Botahamec <botahamec@outlook.com> | 2023-08-09 10:07:05 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2023-08-09 10:07:05 -0400 |
| commit | e45e83fc37d8f95427a29cb78a274398877f7b05 (patch) | |
| tree | 0fe4869c5a776d9da1249b7c52b6d484555313f5 /src/result.rs | |
| parent | a9f00c924fc816bd8103b4b05574f02fc4d1966f (diff) | |
Allow RawUnexpected to be used with no alloc
Diffstat (limited to 'src/result.rs')
| -rw-r--r-- | src/result.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/result.rs b/src/result.rs index 344de5b..0bef098 100644 --- a/src/result.rs +++ b/src/result.rs @@ -66,14 +66,14 @@ impl<T, E: Error + Send + Sync + 'static> ResultErrorExt<T> for Result<T, E> { } } -#[cfg(feature = "alloc")] +#[cfg(feature = "std")] impl<T> ResultErrorExt<T> for Result<T, RawUnexpected> { fn unexpect(self) -> Self { self } } -#[cfg(feature = "alloc")] +#[cfg(feature = "std")] impl<T> ResultErrorExt<T> for Option<T> { fn unexpect(self) -> Result<T, RawUnexpected> { self.ok_or_else(RawUnexpected::none) |
