File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -29,33 +29,6 @@ pub(crate) fn map_channel_err<T>(err: async_channel::SendError<T>) -> Error {
29
29
}
30
30
31
31
pub ( crate ) const UINT_24_LENGTH : usize = 3 ;
32
- #[ cfg( feature = "uint24" ) ]
33
- mod uint24 {
34
- use super :: UINT_24_LENGTH ;
35
- pub struct Uint24LE ( [ u8 ; UINT_24_LENGTH ] ) ;
36
- impl Uint24LE {
37
- pub const MAX_USIZE : usize = 16777215 ;
38
- pub const SIZE : usize = UINT_24_LENGTH ;
39
- }
40
-
41
- impl AsRef < [ u8 ; 3 ] > for Uint24LE {
42
- fn as_ref ( & self ) -> & [ u8 ; 3 ] {
43
- & self . 0
44
- }
45
- }
46
-
47
- // TODO we are using std::io::Error everywhere so I won't add a new one but this isn't ideal
48
- impl TryFrom < usize > for Uint24LE {
49
- type Error = Error ;
50
-
51
- fn try_from ( n : usize ) -> Result < Self , Self :: Error > {
52
- if n > Self :: MAX_USIZE {
53
- todo ! ( )
54
- }
55
- Ok ( Self ( [ ( n & 255 ) as u8 , ( n >> 8 ) as u8 , ( n >> 16 ) as u8 ] ) )
56
- }
57
- }
58
- }
59
32
#[ inline]
60
33
pub ( crate ) fn wrap_uint24_le ( data : & [ u8 ] ) -> Vec < u8 > {
61
34
let mut buf: Vec < u8 > = vec ! [ 0 ; 3 ] ;
You can’t perform that action at this time.
0 commit comments