1- //! Efficient, zero-copy access to SlotHashes sysvar data.
1+ //! Efficient, zero-copy access to ` SlotHashes` sysvar data.
22
33pub mod raw;
44#[ doc( inline) ]
@@ -59,7 +59,7 @@ pub struct SlotHashEntry {
5959// Fail compilation if `SlotHashEntry` is not byte-aligned.
6060const _: [ ( ) ; 1 ] = [ ( ) ; mem:: align_of :: < SlotHashEntry > ( ) ] ;
6161
62- /// SlotHashes provides read-only, zero-copy access to SlotHashes sysvar bytes.
62+ /// ` SlotHashes` provides read-only, zero-copy access to ` SlotHashes` sysvar bytes.
6363pub struct SlotHashes < T : Deref < Target = [ u8 ] > > {
6464 data : T ,
6565}
@@ -93,7 +93,7 @@ pub(crate) unsafe fn read_entry_count_from_bytes_unchecked(data: &[u8]) -> usize
9393 u64:: from_le_bytes ( * ( data. as_ptr ( ) as * const [ u8 ; NUM_ENTRIES_SIZE ] ) ) as usize
9494}
9595
96- /// Validates SlotHashes data format.
96+ /// Validates ` SlotHashes` data format.
9797///
9898/// The function checks:
9999/// 1. The buffer is large enough to contain the entry count.
@@ -152,7 +152,7 @@ impl<T: Deref<Target = [u8]>> SlotHashes<T> {
152152 ///
153153 /// This function is unsafe because it does not validate the data size or format.
154154 /// The caller must ensure:
155- /// 1. The underlying byte slice in `data` represents valid SlotHashes data
155+ /// 1. The underlying byte slice in `data` represents valid ` SlotHashes` data
156156 /// (length prefix + entries, where entries are sorted in descending order by slot).
157157 /// 2. The data slice has at least `NUM_ENTRIES_SIZE + (declared_entries * ENTRY_SIZE)` bytes.
158158 /// 3. The first 8 bytes contain a valid entry count in little-endian format.
@@ -272,7 +272,7 @@ impl<'a> SlotHashes<Ref<'a, [u8]>> {
272272 /// The returned instance is valid for the lifetime of the borrow.
273273 ///
274274 /// # Errors
275- /// - `ProgramError::InvalidArgument` if the account key doesn't match the SlotHashes sysvar ID
275+ /// - `ProgramError::InvalidArgument` if the account key doesn't match the ` SlotHashes` sysvar ID
276276 /// - `ProgramError::AccountBorrowFailed` if the account data is already mutably borrowed
277277 #[ inline( always) ]
278278 pub fn from_account_info ( account_info : & ' a AccountInfo ) -> Result < Self , ProgramError > {
@@ -289,7 +289,7 @@ impl<'a> SlotHashes<Ref<'a, [u8]>> {
289289
290290#[ cfg( feature = "std" ) ]
291291impl SlotHashes < Box < [ u8 ] > > {
292- /// Fills the provided buffer with the full SlotHashes sysvar data.
292+ /// Fills the provided buffer with the full ` SlotHashes` sysvar data.
293293 ///
294294 /// # Safety
295295 /// The caller must ensure the buffer pointer is valid for MAX_SIZE bytes.
@@ -321,7 +321,7 @@ impl SlotHashes<Box<[u8]>> {
321321 Ok ( buf. into_boxed_slice ( ) )
322322 }
323323
324- /// Fetches the SlotHashes sysvar data directly via syscall. This copies
324+ /// Fetches the ` SlotHashes` sysvar data directly via syscall. This copies
325325 /// the full sysvar data (`MAX_SIZE` bytes).
326326 #[ inline( always) ]
327327 pub fn fetch ( ) -> Result < Self , ProgramError > {
0 commit comments