Skip to content

Commit 4195ddf

Browse files
bors[bot]kaidokertcuviper
authored
Merge #224
224: Convert between int and bytes #189 r=cuviper a=kaidokert Picking up #103 from `@flier` to rebase and factor in feedback. Making a quick draft first Co-authored-by: Kaido Kert <[email protected]> Co-authored-by: Josh Stone <[email protected]> Co-authored-by: kaidokert <[email protected]>
2 parents 13cd223 + bbeeaa2 commit 4195ddf

File tree

4 files changed

+408
-0
lines changed

4 files changed

+408
-0
lines changed

build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ fn main() {
1717
}
1818
ac.emit_expression_cfg("1f64.is_subnormal()", "has_is_subnormal");
1919

20+
ac.emit_expression_cfg("1u32.to_ne_bytes()", "has_int_to_from_bytes");
21+
ac.emit_expression_cfg("3.14f64.to_ne_bytes()", "has_float_to_from_bytes");
22+
2023
autocfg::rerun_path("build.rs");
2124
}

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub use crate::float::FloatConst;
3535
pub use crate::cast::{cast, AsPrimitive, FromPrimitive, NumCast, ToPrimitive};
3636
pub use crate::identities::{one, zero, One, Zero};
3737
pub use crate::int::PrimInt;
38+
pub use crate::ops::bytes::{FromBytes, ToBytes};
3839
pub use crate::ops::checked::{
3940
CheckedAdd, CheckedDiv, CheckedMul, CheckedNeg, CheckedRem, CheckedShl, CheckedShr, CheckedSub,
4041
};

0 commit comments

Comments
 (0)