@@ -444,18 +444,18 @@ impl NbtElement {
444444 use super :: result:: * ;
445445
446446 ok ( match element {
447- NbtByte :: ID => Self :: Byte ( NbtByte :: from_bytes ( decoder) ?) ,
448- NbtShort :: ID => Self :: Short ( NbtShort :: from_bytes ( decoder) ?) ,
449- NbtInt :: ID => Self :: Int ( NbtInt :: from_bytes ( decoder) ?) ,
450- NbtLong :: ID => Self :: Long ( NbtLong :: from_bytes ( decoder) ?) ,
451- NbtFloat :: ID => Self :: Float ( NbtFloat :: from_bytes ( decoder) ?) ,
452- NbtDouble :: ID => Self :: Double ( NbtDouble :: from_bytes ( decoder) ?) ,
453- NbtByteArray :: ID => Self :: ByteArray ( NbtByteArray :: from_bytes ( decoder) ?) ,
454- NbtString :: ID => Self :: String ( NbtString :: from_bytes ( decoder) ?) ,
455- NbtList :: ID => Self :: List ( NbtList :: from_bytes ( decoder) ?) ,
456- NbtCompound :: ID => Self :: Compound ( NbtCompound :: from_bytes ( decoder) ?) ,
457- NbtIntArray :: ID => Self :: IntArray ( NbtIntArray :: from_bytes ( decoder) ?) ,
458- NbtLongArray :: ID => Self :: LongArray ( NbtLongArray :: from_bytes ( decoder) ?) ,
447+ NbtByte :: ID => Self :: Byte ( NbtByte :: from_bytes ( decoder, ( ) ) ?) ,
448+ NbtShort :: ID => Self :: Short ( NbtShort :: from_bytes ( decoder, ( ) ) ?) ,
449+ NbtInt :: ID => Self :: Int ( NbtInt :: from_bytes ( decoder, ( ) ) ?) ,
450+ NbtLong :: ID => Self :: Long ( NbtLong :: from_bytes ( decoder, ( ) ) ?) ,
451+ NbtFloat :: ID => Self :: Float ( NbtFloat :: from_bytes ( decoder, ( ) ) ?) ,
452+ NbtDouble :: ID => Self :: Double ( NbtDouble :: from_bytes ( decoder, ( ) ) ?) ,
453+ NbtByteArray :: ID => Self :: ByteArray ( NbtByteArray :: from_bytes ( decoder, ( ) ) ?) ,
454+ NbtString :: ID => Self :: String ( NbtString :: from_bytes ( decoder, ( ) ) ?) ,
455+ NbtList :: ID => Self :: List ( NbtList :: from_bytes ( decoder, ( ) ) ?) ,
456+ NbtCompound :: ID => Self :: Compound ( NbtCompound :: from_bytes ( decoder, ( ) ) ?) ,
457+ NbtIntArray :: ID => Self :: IntArray ( NbtIntArray :: from_bytes ( decoder, ( ) ) ?) ,
458+ NbtLongArray :: ID => Self :: LongArray ( NbtLongArray :: from_bytes ( decoder, ( ) ) ?) ,
459459 _ => return err ( "Invalid NBT type" ) ,
460460 } )
461461 }
@@ -493,7 +493,7 @@ impl NbtElement {
493493 if is_ok ( & decoder. assert_len ( 2 ) ) && unsafe { decoder. u16 ( ) } != 0_u16 . to_be ( ) {
494494 decoder. skip ( -2_isize as usize ) ;
495495 }
496- let nbt = Self :: Compound ( NbtCompound :: from_bytes ( & mut decoder) ?) ;
496+ let nbt = Self :: Compound ( NbtCompound :: from_bytes ( & mut decoder, ( ) ) ?) ;
497497 if is_ok ( & decoder. assert_len ( 1 ) ) {
498498 return err ( "Format should take all the bytes" ) ;
499499 }
@@ -502,7 +502,7 @@ impl NbtElement {
502502
503503 pub fn from_be_mca ( bytes : & [ u8 ] ) -> NbtParseResult < Self > {
504504 let mut decoder = BigEndianDecoder :: new ( bytes) ;
505- NbtRegion :: from_bytes ( & mut decoder) . map ( Self :: Region )
505+ NbtRegion :: from_bytes ( & mut decoder, ( ) ) . map ( Self :: Region )
506506 }
507507
508508 #[ must_use]
@@ -517,13 +517,13 @@ impl NbtElement {
517517 decoder. assert_len ( 2 ) ?;
518518 let skip = unsafe { decoder. u16 ( ) } as usize ;
519519 decoder. skip ( skip) ;
520- ok ( ( Self :: Compound ( NbtCompound :: from_bytes ( & mut decoder) ?) , decoder. has_header ( ) ) )
520+ ok ( ( Self :: Compound ( NbtCompound :: from_bytes ( & mut decoder, ( ) ) ?) , decoder. has_header ( ) ) )
521521 }
522522 NbtList :: ID => {
523523 decoder. assert_len ( 2 ) ?;
524524 let skip = unsafe { decoder. u16 ( ) } as usize ;
525525 decoder. skip ( skip) ;
526- ok ( ( Self :: List ( NbtList :: from_bytes ( & mut decoder) ?) , decoder. has_header ( ) ) )
526+ ok ( ( Self :: List ( NbtList :: from_bytes ( & mut decoder, ( ) ) ?) , decoder. has_header ( ) ) )
527527 }
528528 _ => err ( "Little-endian should start with either Compound or List" ) ,
529529 } ;
0 commit comments