Skip to content

Refactor MediaFile and related structures to use Arc<str> for name an…#11

Merged
mikeleppane merged 1 commit into
mainfrom
fix(clipp)/fix-clippy-lints
Jul 28, 2025
Merged

Refactor MediaFile and related structures to use Arc<str> for name an…#11
mikeleppane merged 1 commit into
mainfrom
fix(clipp)/fix-clippy-lints

Conversation

@mikeleppane
Copy link
Copy Markdown
Owner

  • Updated MediaFile struct to use Arc for name and extension fields.
  • Modified CacheEntry and FileManager to accommodate changes in MediaFile.
  • Adjusted file organization logic in FileOrganizer to handle Arc correctly.
  • Refactored filter matching logic in FilterSet to utilize Arc.
  • Updated tests across various modules to reflect changes in MediaFile structure.
  • Enhanced performance by reducing string allocations through the use of Arc.

Description

Fixes # (issue)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Test improvement
  • CI/CD improvement
  • Other (please describe):

How Has This Been Tested?

  • Unit tests pass locally with cargo test
  • Integration tests pass
  • Manual testing completed
  • Tested on Linux
  • Tested on macOS
  • Tested on Windows

Test Configuration:

  • Rust version:
  • OS:
  • Terminal:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have run cargo fmt to format my code
  • I have run cargo clippy -- -D warnings and addressed all issues
  • I have updated the CHANGELOG.md file (if applicable)

Screenshots / Terminal Output

Screenshots
Terminal Output
<!-- Add terminal output here -->

Performance Impact

  • This change has no performance impact
  • This change improves performance
  • This change may degrade performance

Breaking Changes

  • This change is backwards compatible
  • This change requires migration steps

Additional Context

Related Issues / PRs

  • Related to #
  • Depends on #
  • Blocks #

Reviewer Notes


For Maintainers

  • Changes are covered by tests
  • Documentation has been updated
  • CHANGELOG.md has been updated (if needed)
  • Performance impact has been considered
  • Security implications have been reviewed
  • Cross-platform compatibility verified

…d extension

- Updated MediaFile struct to use Arc<str> for name and extension fields.
- Modified CacheEntry and FileManager to accommodate changes in MediaFile.
- Adjusted file organization logic in FileOrganizer to handle Arc<str> correctly.
- Refactored filter matching logic in FilterSet to utilize Arc<str>.
- Updated tests across various modules to reflect changes in MediaFile structure.
- Enhanced performance by reducing string allocations through the use of Arc.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 57.42905% with 255 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@ea81f77). Learn more about missing BASE report.
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
crates/app/src/actions.rs 0.00% 230 Missing ⚠️
crates/app/src/navigation.rs 0.00% 4 Missing ⚠️
crates/core/src/organizer.rs 96.80% 4 Missing ⚠️
crates/core/src/undo_manager.rs 33.33% 4 Missing ⚠️
crates/core/src/duplicate_detector.rs 96.25% 3 Missing ⚠️
crates/ui/src/duplicate_detector.rs 0.00% 2 Missing ⚠️
crates/ui/src/search.rs 0.00% 2 Missing ⚠️
crates/app/src/duplicates.rs 0.00% 1 Missing ⚠️
crates/app/src/filters.rs 0.00% 1 Missing ⚠️
crates/app/src/handlers.rs 0.00% 1 Missing ⚠️
... and 3 more

❌ Your patch status has failed because the patch coverage (57.42%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #11   +/-   ##
=======================================
  Coverage        ?   56.07%           
=======================================
  Files           ?       30           
  Lines           ?     8836           
  Branches        ?        0           
=======================================
  Hits            ?     4955           
  Misses          ?     3881           
  Partials        ?        0           
Files with missing lines Coverage Δ
crates/config/src/settings.rs 99.65% <100.00%> (ø)
crates/core/src/file_cache.rs 98.98% <100.00%> (ø)
crates/core/src/file_manager.rs 100.00% <100.00%> (ø)
crates/core/src/scanner.rs 93.25% <100.00%> (ø)
crates/models/src/filters.rs 100.00% <100.00%> (ø)
crates/models/src/media_file.rs 98.61% <100.00%> (ø)
crates/models/src/statistics.rs 100.00% <100.00%> (ø)
crates/utils/src/progress.rs 99.58% <100.00%> (ø)
crates/app/src/duplicates.rs 0.00% <0.00%> (ø)
crates/app/src/filters.rs 0.00% <0.00%> (ø)
... and 11 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea81f77...66bc4f2. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jul 28, 2025

CodSpeed Performance Report

Merging #11 will create unknown performance changes

Comparing fix(clipp)/fix-clippy-lints (66bc4f2) with main (ea81f77)

Summary

⚠️ No benchmarks were detected in both the base of the PR and the PR.\

@mikeleppane mikeleppane merged commit cd18a32 into main Jul 28, 2025
14 checks passed
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.

2 participants