File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 51
51
[ 0xff ; ERASABLE_BLOCK_SIZE ] ;
52
52
let buf = & mut buf[ .. size_of :: < Item > ( ) ] ;
53
53
self . storage . read_exact ( self . current , buf) . ok ( ) ?;
54
- let result = Item :: from_bytes_b ( buf) ?; // TODO: Check for errors.
54
+ let result = Item :: from_slice ( buf) ?; // TODO: Check for errors.
55
55
self . current = self
56
56
. current
57
57
. checked_add ( size_of :: < Item > ( ) as u32 ) ?;
Original file line number Diff line number Diff line change @@ -916,11 +916,11 @@ pub trait DirectoryEntry {
916
916
fn set_size ( & mut self , value : Option < u32 > ) ;
917
917
}
918
918
pub trait DirectoryEntrySerde : Sized {
919
- fn from_bytes_b ( source : & [ u8 ] ) -> Option < Self > ;
919
+ fn from_slice ( source : & [ u8 ] ) -> Option < Self > ;
920
920
fn copy_into_slice ( & self , destination : & mut [ u8 ] ) ;
921
921
}
922
922
impl DirectoryEntrySerde for PspDirectoryEntry {
923
- fn from_bytes_b ( source : & [ u8 ] ) -> Option < Self > {
923
+ fn from_slice ( source : & [ u8 ] ) -> Option < Self > {
924
924
if source. len ( ) != 16 {
925
925
None
926
926
} else {
@@ -1175,7 +1175,7 @@ make_bitfield_serde! {
1175
1175
}
1176
1176
1177
1177
impl DirectoryEntrySerde for BhdDirectoryEntry {
1178
- fn from_bytes_b ( source : & [ u8 ] ) -> Option < Self > {
1178
+ fn from_slice ( source : & [ u8 ] ) -> Option < Self > {
1179
1179
if source. len ( ) != 24 {
1180
1180
None
1181
1181
} else {
@@ -1413,7 +1413,7 @@ pub struct ComboDirectoryEntry {
1413
1413
}
1414
1414
1415
1415
impl DirectoryEntrySerde for ComboDirectoryEntry {
1416
- fn from_bytes_b ( source : & [ u8 ] ) -> Option < Self > {
1416
+ fn from_slice ( source : & [ u8 ] ) -> Option < Self > {
1417
1417
if source. len ( ) != 16 {
1418
1418
None
1419
1419
} else {
You can’t perform that action at this time.
0 commit comments