add Debug trait to range for accounts index (#19531)

This commit is contained in:
Jeff Washington (jwash)
2021-09-01 08:13:56 -05:00
committed by GitHub
parent 12dc8749cf
commit 82a6bbe068
3 changed files with 6 additions and 6 deletions

View File

@@ -850,7 +850,7 @@ impl<T: IsCached> AccountsIndex<T> {
) -> Result<(), ScanError>
where
F: FnMut(&Pubkey, (&T, Slot)),
R: RangeBounds<Pubkey>,
R: RangeBounds<Pubkey> + std::fmt::Debug,
{
{
let locked_removed_bank_ids = self.removed_bank_ids.lock().unwrap();
@@ -1073,7 +1073,7 @@ impl<T: IsCached> AccountsIndex<T> {
collect_all_unsorted: bool,
) where
F: FnMut(&Pubkey, (&T, Slot)),
R: RangeBounds<Pubkey>,
R: RangeBounds<Pubkey> + std::fmt::Debug,
{
self.do_scan_accounts(
metric_name,
@@ -1098,7 +1098,7 @@ impl<T: IsCached> AccountsIndex<T> {
collect_all_unsorted: bool,
) where
F: FnMut(&Pubkey, (&T, Slot)),
R: RangeBounds<Pubkey>,
R: RangeBounds<Pubkey> + std::fmt::Debug,
{
// TODO: expand to use mint index to find the `pubkey_list` below more efficiently
// instead of scanning the entire range
@@ -1291,7 +1291,7 @@ impl<T: IsCached> AccountsIndex<T> {
func: F,
) where
F: FnMut(&Pubkey, (&T, Slot)),
R: RangeBounds<Pubkey>,
R: RangeBounds<Pubkey> + std::fmt::Debug,
{
// Only the rent logic should be calling this, which doesn't need the safety checks
self.do_unchecked_scan_accounts(