Removing the recent addition of Number::BYTES.
This really does not have anything to do with a Number. This has to deal with the byte representation of certain types and as such it should really live in the Alchemy crate.
This commit is contained in:
parent
4aa410ad7e
commit
04e744fb0f
@ -1,5 +1,3 @@
|
|||||||
use std::{u8, u16, u32, u64, usize};
|
|
||||||
use std::{i8, i16, i32, i64, isize};
|
|
||||||
use std::cmp::PartialEq;
|
use std::cmp::PartialEq;
|
||||||
use std::mem::size_of;
|
use std::mem::size_of;
|
||||||
use std::num::{Zero, One};
|
use std::num::{Zero, One};
|
||||||
@ -18,10 +16,6 @@ pub trait Number : Zero + One + Add<Output=Self> + Sub<Output=Self> +
|
|||||||
type StrRadixError;
|
type StrRadixError;
|
||||||
|
|
||||||
|
|
||||||
/// The amount of Bytes required to represent this Number.
|
|
||||||
const BYTES: usize;
|
|
||||||
|
|
||||||
|
|
||||||
/// Create a number from a given string and base radix.
|
/// Create a number from a given string and base radix.
|
||||||
///
|
///
|
||||||
///```
|
///```
|
||||||
@ -757,9 +751,6 @@ macro_rules! int_number_trait_impl
|
|||||||
type StrRadixError = ::std::num::ParseIntError;
|
type StrRadixError = ::std::num::ParseIntError;
|
||||||
|
|
||||||
|
|
||||||
const BYTES: usize = <$varType>::BYTES;
|
|
||||||
|
|
||||||
|
|
||||||
fn from_str_radix(src: &str, radix: u32) ->
|
fn from_str_radix(src: &str, radix: u32) ->
|
||||||
Result<Self, ::std::num::ParseIntError>
|
Result<Self, ::std::num::ParseIntError>
|
||||||
{
|
{
|
||||||
@ -780,9 +771,6 @@ macro_rules! float_number_trait_impl
|
|||||||
type StrRadixError = ::std::num::ParseFloatError;
|
type StrRadixError = ::std::num::ParseFloatError;
|
||||||
|
|
||||||
|
|
||||||
const BYTES: usize = $numBytes;
|
|
||||||
|
|
||||||
|
|
||||||
fn from_str_radix(src: &str, radix: u32) ->
|
fn from_str_radix(src: &str, radix: u32) ->
|
||||||
Result<Self, ::std::num::ParseFloatError>
|
Result<Self, ::std::num::ParseFloatError>
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user