Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes Default and pub from CumulativeOffset #33840

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions accounts-db/src/accounts_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,14 @@ const _: () = assert!(
"CalculateHashIntermediate cannot have any padding"
);

#[derive(Default, Debug, PartialEq, Eq)]
pub struct CumulativeOffset {
#[derive(Debug, PartialEq, Eq)]
struct CumulativeOffset {
/// Since the source data is at most 2D, two indexes are enough.
pub index: [usize; 2],
pub start_offset: usize,
index: [usize; 2],
start_offset: usize,
}

pub trait ExtractSliceFromRawData<'b, T: 'b> {
trait ExtractSliceFromRawData<'b, T: 'b> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this trait was public, and the extract function takes a CumulativeOffset, that meant CumulativeOffset needed to be public. But extract is only called in this file, so the trait does not need to be public either.

fn extract<'a>(&'b self, offset: &'a CumulativeOffset, start: usize) -> &'b [T];
}

Expand Down