diff --git a/net/epee-encoding/src/varint.rs b/net/epee-encoding/src/varint.rs index e5c564a4..fc862dfd 100644 --- a/net/epee-encoding/src/varint.rs +++ b/net/epee-encoding/src/varint.rs @@ -12,12 +12,12 @@ const FITS_IN_FOUR_BYTES: u64 = 2_u64.pow(32 - SIZE_OF_SIZE_MARKER) - 1; /// ```rust /// use cuprate_epee_encoding::read_varint; /// -/// assert_eq!(read_varint(&mut [252].as_slice()).unwrap(), 63); -/// assert_eq!(read_varint(&mut [1, 1].as_slice()).unwrap(), 64); -/// assert_eq!(read_varint(&mut [253, 255].as_slice()).unwrap(), 16_383); -/// assert_eq!(read_varint(&mut [2, 0, 1, 0].as_slice()).unwrap(), 16_384); -/// assert_eq!(read_varint(&mut [254, 255, 255, 255].as_slice()).unwrap(), 1_073_741_823); -/// assert_eq!(read_varint(&mut [3, 0, 0, 0, 1, 0, 0, 0].as_slice()).unwrap(), 1_073_741_824); +/// assert_eq!(read_varint::<_, u64>(&mut [252].as_slice()).unwrap(), 63); +/// assert_eq!(read_varint::<_, u64>(&mut [1, 1].as_slice()).unwrap(), 64); +/// assert_eq!(read_varint::<_, u64>(&mut [253, 255].as_slice()).unwrap(), 16_383); +/// assert_eq!(read_varint::<_, u64>(&mut [2, 0, 1, 0].as_slice()).unwrap(), 16_384); +/// assert_eq!(read_varint::<_, u64>(&mut [254, 255, 255, 255].as_slice()).unwrap(), 1_073_741_823); +/// assert_eq!(read_varint::<_, u64>(&mut [3, 0, 0, 0, 1, 0, 0, 0].as_slice()).unwrap(), 1_073_741_824); /// ``` pub fn read_varint>(r: &mut B) -> Result { if !r.has_remaining() {