Skip to content

Commit

Permalink
refactor: don't use Fn when FnOnce will suffice (#10301)
Browse files Browse the repository at this point in the history
This function calls the closure just once so no need to take a more
restrictive closure.
  • Loading branch information
akhi3030 authored Dec 6, 2023
1 parent a908de3 commit cdceb1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/store/src/trie/state_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ impl ShardTries {
/// we don't deal with multiple snapshots here because we will deal with it whenever a new snapshot is created and saved to file system
pub fn maybe_open_state_snapshot(
&self,
get_shard_uids_fn: impl Fn(CryptoHash) -> Result<Vec<ShardUId>, EpochError>,
get_shard_uids_fn: impl FnOnce(CryptoHash) -> Result<Vec<ShardUId>, EpochError>,
) -> Result<(), anyhow::Error> {
let _span =
tracing::info_span!(target: "state_snapshot", "maybe_open_state_snapshot").entered();
Expand Down

0 comments on commit cdceb1c

Please sign in to comment.