@@ -356,7 +356,7 @@ public final class MsbBitReader: ByteReader, BitReader {
356356 precondition ( bitMask == 128 , " BitReader is not aligned. " )
357357 precondition ( data. endIndex - offset >= 8 )
358358 defer { offset += 8 }
359- return data [ offset..< offset + 8 ] . to ( type : UInt64 . self )
359+ return data [ offset..< offset + 8 ] . toU64 ( )
360360 } ( self . data, & self . offset, self . bitMask)
361361 #else
362362 precondition ( bitMask == 128 , " BitReader is not aligned. " )
@@ -410,7 +410,7 @@ public final class MsbBitReader: ByteReader, BitReader {
410410 precondition ( bitMask == 128 , " BitReader is not aligned. " )
411411 precondition ( data. endIndex - offset >= 4 )
412412 defer { offset += 4 }
413- return data [ offset..< offset + 4 ] . to ( type : UInt32 . self )
413+ return data [ offset..< offset + 4 ] . toU32 ( )
414414 } ( self . data, & self . offset, self . bitMask)
415415 #else
416416 precondition ( bitMask == 128 , " BitReader is not aligned. " )
@@ -464,7 +464,7 @@ public final class MsbBitReader: ByteReader, BitReader {
464464 precondition ( bitMask == 128 , " BitReader is not aligned. " )
465465 precondition ( data. endIndex - offset >= 2 )
466466 defer { offset += 2 }
467- return data [ offset..< offset + 2 ] . to ( type : UInt16 . self )
467+ return data [ offset..< offset + 2 ] . toU16 ( )
468468 } ( self . data, & self . offset, self . bitMask)
469469 #else
470470 precondition ( bitMask == 128 , " BitReader is not aligned. " )
0 commit comments