Skip to content

Commit b5d4f87

Browse files
taiki-ecarllerche
authored andcommitted
Remove i128 feature (#276)
1 parent e07a949 commit b5d4f87

File tree

4 files changed

+1
-24
lines changed

4 files changed

+1
-24
lines changed

Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,10 @@ edition = "2018"
1919

2020
publish = false
2121

22-
[package.metadata.docs.rs]
23-
features = ["i128"]
24-
2522
[dependencies]
26-
byteorder = "1.1.0"
23+
byteorder = "1.3"
2724
serde = { version = "1.0", optional = true }
2825
either = { version = "1.5", default-features = false, optional = true }
2926

3027
[dev-dependencies]
3128
serde_test = "1.0"
32-
33-
[features]
34-
i128 = ["byteorder/i128"]

azure-pipelines.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
cross: true
3131
features:
3232
- serde
33-
- i128
3433
- either
3534

3635
# Nightly

src/buf/buf.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,6 @@ pub trait Buf {
539539

540540
/// Gets an unsigned 128 bit integer from `self` in big-endian byte order.
541541
///
542-
/// **NOTE:** This method requires the `i128` feature.
543542
/// The current position is advanced by 16.
544543
///
545544
/// # Examples
@@ -554,14 +553,12 @@ pub trait Buf {
554553
/// # Panics
555554
///
556555
/// This function panics if there is not enough remaining data in `self`.
557-
#[cfg(feature = "i128")]
558556
fn get_u128(&mut self) -> u128 {
559557
buf_get_impl!(self, 16, BigEndian::read_u128);
560558
}
561559

562560
/// Gets an unsigned 128 bit integer from `self` in little-endian byte order.
563561
///
564-
/// **NOTE:** This method requires the `i128` feature.
565562
/// The current position is advanced by 16.
566563
///
567564
/// # Examples
@@ -576,14 +573,12 @@ pub trait Buf {
576573
/// # Panics
577574
///
578575
/// This function panics if there is not enough remaining data in `self`.
579-
#[cfg(feature = "i128")]
580576
fn get_u128_le(&mut self) -> u128 {
581577
buf_get_impl!(self, 16, LittleEndian::read_u128);
582578
}
583579

584580
/// Gets a signed 128 bit integer from `self` in big-endian byte order.
585581
///
586-
/// **NOTE:** This method requires the `i128` feature.
587582
/// The current position is advanced by 16.
588583
///
589584
/// # Examples
@@ -598,14 +593,12 @@ pub trait Buf {
598593
/// # Panics
599594
///
600595
/// This function panics if there is not enough remaining data in `self`.
601-
#[cfg(feature = "i128")]
602596
fn get_i128(&mut self) -> i128 {
603597
buf_get_impl!(self, 16, BigEndian::read_i128);
604598
}
605599

606600
/// Gets a signed 128 bit integer from `self` in little-endian byte order.
607601
///
608-
/// **NOTE:** This method requires the `i128` feature.
609602
/// The current position is advanced by 16.
610603
///
611604
/// # Examples
@@ -620,7 +613,6 @@ pub trait Buf {
620613
/// # Panics
621614
///
622615
/// This function panics if there is not enough remaining data in `self`.
623-
#[cfg(feature = "i128")]
624616
fn get_i128_le(&mut self) -> i128 {
625617
buf_get_impl!(self, 16, LittleEndian::read_i128);
626618
}

src/buf/buf_mut.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ pub trait BufMut {
625625

626626
/// Writes an unsigned 128 bit integer to `self` in the big-endian byte order.
627627
///
628-
/// **NOTE:** This method requires the `i128` feature.
629628
/// The current position is advanced by 16.
630629
///
631630
/// # Examples
@@ -642,7 +641,6 @@ pub trait BufMut {
642641
///
643642
/// This function panics if there is not enough remaining capacity in
644643
/// `self`.
645-
#[cfg(feature = "i128")]
646644
fn put_u128(&mut self, n: u128) {
647645
let mut buf = [0; 16];
648646
BigEndian::write_u128(&mut buf, n);
@@ -651,7 +649,6 @@ pub trait BufMut {
651649

652650
/// Writes an unsigned 128 bit integer to `self` in little-endian byte order.
653651
///
654-
/// **NOTE:** This method requires the `i128` feature.
655652
/// The current position is advanced by 16.
656653
///
657654
/// # Examples
@@ -668,7 +665,6 @@ pub trait BufMut {
668665
///
669666
/// This function panics if there is not enough remaining capacity in
670667
/// `self`.
671-
#[cfg(feature = "i128")]
672668
fn put_u128_le(&mut self, n: u128) {
673669
let mut buf = [0; 16];
674670
LittleEndian::write_u128(&mut buf, n);
@@ -677,7 +673,6 @@ pub trait BufMut {
677673

678674
/// Writes a signed 128 bit integer to `self` in the big-endian byte order.
679675
///
680-
/// **NOTE:** This method requires the `i128` feature.
681676
/// The current position is advanced by 16.
682677
///
683678
/// # Examples
@@ -694,7 +689,6 @@ pub trait BufMut {
694689
///
695690
/// This function panics if there is not enough remaining capacity in
696691
/// `self`.
697-
#[cfg(feature = "i128")]
698692
fn put_i128(&mut self, n: i128) {
699693
let mut buf = [0; 16];
700694
BigEndian::write_i128(&mut buf, n);
@@ -703,7 +697,6 @@ pub trait BufMut {
703697

704698
/// Writes a signed 128 bit integer to `self` in little-endian byte order.
705699
///
706-
/// **NOTE:** This method requires the `i128` feature.
707700
/// The current position is advanced by 16.
708701
///
709702
/// # Examples
@@ -720,7 +713,6 @@ pub trait BufMut {
720713
///
721714
/// This function panics if there is not enough remaining capacity in
722715
/// `self`.
723-
#[cfg(feature = "i128")]
724716
fn put_i128_le(&mut self, n: i128) {
725717
let mut buf = [0; 16];
726718
LittleEndian::write_i128(&mut buf, n);

0 commit comments

Comments
 (0)