@@ -18,7 +18,7 @@ pub const MAX_PERMITTED_DATA_INCREASE: usize = 1_024 * 10;
1818
1919/// Represents masks for borrow state of an account.
2020#[ repr( u8 ) ]
21- #[ derive( Clone , Copy ) ]
21+ #[ derive( Clone , Copy , Debug ) ]
2222pub enum BorrowState {
2323 /// Mask to check whether an account is already borrowed.
2424 ///
@@ -112,7 +112,7 @@ pub(crate) struct Account {
112112/// used to track borrows of the account data and lamports, given that an
113113/// account can be "shared" across multiple `AccountInfo` instances.
114114#[ repr( C ) ]
115- #[ derive( Clone , PartialEq , Eq ) ]
115+ #[ derive( Clone , Copy , PartialEq , Eq , Debug ) ]
116116pub struct AccountInfo {
117117 /// Raw (pointer to) account data.
118118 ///
@@ -643,6 +643,7 @@ const LAMPORTS_BORROW_SHIFT: u8 = 4;
643643const DATA_BORROW_SHIFT : u8 = 0 ;
644644
645645/// Reference to account data or lamports with checked borrow rules.
646+ #[ derive( Debug ) ]
646647pub struct Ref < ' a , T : ?Sized > {
647648 value : NonNull < T > ,
648649 state : NonNull < u8 > ,
@@ -714,6 +715,7 @@ const LAMPORTS_MUTABLE_BORROW_BITMASK: u8 = 0b_1000_0000;
714715const DATA_MUTABLE_BORROW_BITMASK : u8 = 0b_0000_1000 ;
715716
716717/// Mutable reference to account data or lamports with checked borrow rules.
718+ #[ derive( Debug ) ]
717719pub struct RefMut < ' a , T : ?Sized > {
718720 value : NonNull < T > ,
719721 state : NonNull < u8 > ,
0 commit comments