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

chore: use &Path in FileRegistry::new_from_paths() #594

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Dec 31, 2024

Fixes #591.

Happy New Year!

@arendjr arendjr requested a review from a team as a code owner December 31, 2024 18:21
@@ -37,7 +37,7 @@ pub struct FileRegistry<'a, Q: QueryContext> {
/// The number of versions for each file
version_count: Vec<u16>,
/// Original file paths, for lazy loading
file_paths: Vec<&'a PathBuf>,
file_paths: Vec<&'a Path>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing it to a &Path makes fewer assumptions on where the paths come from, and it doesn't appear to have any downstream effects.

@arendjr arendjr changed the title chore: use Iterator over &Path in FileRegistry::new_from_paths() chore: use &Path in FileRegistry::new_from_paths() Dec 31, 2024
Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Works for me, assuming @ematipico agrees. Happy new year!

@ematipico
Copy link

That should work, thank you :)

@morgante morgante merged commit 624a70a into getgrit:main Jan 2, 2025
6 checks passed
This was referenced Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve FileRegistry creation APIs
3 participants