File tree Expand file tree Collapse file tree
libdd-trace-utils/src/change_buffer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,22 +61,6 @@ impl ChangeBuffer {
6161 Ok ( T :: from_bytes ( bytes) )
6262 }
6363
64- /// Read a value without bounds checking.
65- ///
66- /// # Safety
67- ///
68- /// Caller must ensure `*index + size_of::<T>() <= self.len` and that `index + size_of<T>::() <
69- /// usize::MAX`.
70- #[ inline( always) ]
71- unsafe fn read_unchecked < T : FromBytes > ( & self , index : & mut usize ) -> T {
72- // Safety: the allocation of `self.ptr` is guaranteed to be valid for read and writes at
73- // construction time. We do not materialize other references during the lifetime of `slice`.
74- let slice = unsafe { self . as_slice ( ) } ;
75- let bytes = slice. get_unchecked ( * index..* index + T :: FROM_BYTES_SIZE ) ;
76- * index += T :: FROM_BYTES_SIZE ;
77- T :: from_bytes ( bytes)
78- }
79-
8064 /// Write a raw `u32` in the buffer.
8165 pub fn write_u32 ( & mut self , offset : usize , value : u32 ) -> Result < ( ) > {
8266 let len = self . len ;
You can’t perform that action at this time.
0 commit comments