Skip to content

Commit

Permalink
fix features
Browse files Browse the repository at this point in the history
  • Loading branch information
Darksonn committed Oct 1, 2023
1 parent 0abd535 commit a382857
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/buf/buf_impl.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#[cfg(feature = "std")]
use crate::buf::{reader, Reader};
use crate::buf::{take, Chain, Take};
use crate::{min_u64_usize, panic_advance, panic_does_not_fit, saturating_sub_usize_u64};
#[cfg(feature = "std")]
use crate::{min_u64_usize, saturating_sub_usize_u64};
use crate::{panic_advance, panic_does_not_fit};

#[cfg(feature = "std")]
use std::io::IoSlice;
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ fn abort() -> ! {
}

#[inline(always)]
#[cfg(feature = "std")]
fn saturating_sub_usize_u64(a: usize, b: u64) -> usize {
use core::convert::TryFrom;
match usize::try_from(b) {
Expand All @@ -126,6 +127,7 @@ fn saturating_sub_usize_u64(a: usize, b: u64) -> usize {
}

#[inline(always)]
#[cfg(feature = "std")]
fn min_u64_usize(a: u64, b: usize) -> usize {
use core::convert::TryFrom;
match usize::try_from(a) {
Expand Down

0 comments on commit a382857

Please sign in to comment.