Skip to content

Commit

Permalink
Display for TryGetError also for no_std builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
hpenne committed Jan 10, 2025
1 parent 084d70b commit fd05103
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/buf/buf_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ pub enum TryGetError {
},
}

#[cfg(feature = "std")]
impl std::fmt::Display for TryGetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
impl core::fmt::Display for TryGetError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
match self {
TryGetError::OutOfBytes {
requested,
Expand Down

0 comments on commit fd05103

Please sign in to comment.