Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Use regex in get_snapshot_file_kind#27728

Merged
apfitzge merged 1 commit intosolana-labs:masterfrom
apfitzge:refactor/get_snapshot_file_kind_regex
Sep 22, 2022
Merged

Use regex in get_snapshot_file_kind#27728
apfitzge merged 1 commit intosolana-labs:masterfrom
apfitzge:refactor/get_snapshot_file_kind_regex

Conversation

@apfitzge
Copy link
Copy Markdown
Contributor

Problem

Follow up for #27484. Refactor get_snapshot_file_kind to use regex.

Summary of Changes

Refactor get_snapshot_file_kind to use regex.

Fixes #

}

/// Determines `SnapshotFileKind` for `filename` if any
fn get_snapshot_file_kind(filename: &str) -> Option<SnapshotFileKind> {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is something like this what you had in mind @brooksprumo?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes! Looks good to me. Thanks for doing this.

@apfitzge apfitzge force-pushed the refactor/get_snapshot_file_kind_regex branch from cfdf9a5 to 26ff2d4 Compare September 22, 2022 16:49
@apfitzge apfitzge marked this pull request as ready for review September 22, 2022 16:52
@apfitzge apfitzge merged commit 64f64de into solana-labs:master Sep 22, 2022
@apfitzge apfitzge deleted the refactor/get_snapshot_file_kind_regex branch September 22, 2022 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants