From 2a91373691dfc1fde601f1eff91f9fdf32b13585 Mon Sep 17 00:00:00 2001 From: Boog900 <54e72d8a-345f-4599-bd90-c6b9bc7d0ec5@aleeas.com> Date: Fri, 1 Nov 2024 22:50:16 +0000 Subject: [PATCH] fix docs --- net/epee-encoding/src/varint.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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() {