Skip to content

Commit 98f09b8

Browse files
committed
Switch from core2 to no_std_io2
1 parent c7fc2ba commit 98f09b8

5 files changed

Lines changed: 10 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# v0.12.7
2+
- Switch from `core2` to `no_std_io2`, as core2 was yanked
13
# v0.12.6
24
- Fall back to `#[repr(...)]` if `#[discriminant_type(...)]` is missing
35
# v0.12.5

bin-proto/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ rustdoc-args = ["--cfg", "docsrs"]
1818

1919
[dependencies]
2020
bin-proto-derive = { path = "../bin-proto-derive", version = "0.12.2", optional = true }
21-
bitstream-io = { version = "4.6.0", default-features = false }
22-
core2 = { version = "0.4.0", default-features = false }
21+
bitstream-io = { version = "4.10.0", default-features = false }
22+
no_std_io2 = { version = "0.9", default-features = false }
2323

2424
[dev-dependencies]
2525
proptest = "1.8.0"
2626

2727
[features]
2828
default = ["alloc", "derive", "std"]
29-
alloc = ["bitstream-io/alloc", "core2/alloc"]
29+
alloc = ["bitstream-io/alloc", "no_std_io2/alloc"]
3030
derive = ["dep:bin-proto-derive"]
3131
prepend-tags = []
32-
std = ["alloc", "bitstream-io/std", "core2/std"]
32+
std = ["alloc", "bitstream-io/std", "no_std_io2/std"]

bin-proto/src/codec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::io::{self, Cursor};
55

66
use bitstream_io::{BitRead, BitReader, BitWrite, BitWriter, Endianness};
77
#[cfg(not(feature = "std"))]
8-
use core2::io::{self, Cursor};
8+
use no_std_io2::io::{self, Cursor};
99

1010
use crate::{Error, Result};
1111

@@ -244,7 +244,7 @@ macro_rules! test_encode {
244244
let mut buffer = [0u8; 16];
245245
value
246246
.encode::<_, ::bitstream_io::BigEndian>(
247-
&mut ::bitstream_io::BitWriter::endian(&mut ::core2::io::Cursor::new(buffer.as_mut_slice()), ::bitstream_io::BigEndian),
247+
&mut ::bitstream_io::BitWriter::endian(&mut ::no_std_io2::io::Cursor::new(buffer.as_mut_slice()), ::bitstream_io::BigEndian),
248248
&mut (),
249249
($($tag)?),
250250
)

bin-proto/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use core::{convert::Infallible, fmt};
55
use std::io;
66

77
#[cfg(not(feature = "std"))]
8-
use core2::io;
8+
use no_std_io2::io;
99

1010
/// Alias for a Result with the error type [`Error`].
1111
pub type Result<T> = core::result::Result<T, Error>;

bin-proto/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::iter;
88
use std::io;
99

1010
#[cfg(not(feature = "std"))]
11-
use core2::io;
11+
use no_std_io2::io;
1212

1313
/// [`BitEncode`]s an iterator of parcels to the stream.
1414
///

0 commit comments

Comments
 (0)