refactor: Split mime-guess layer to new crate#6966
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the mime-guess layer from the core crate into a new separate crate opendal-layer-mime-guess, following the same pattern used for other layers like metrics and prometheus. This modularization improves code organization and allows the mime-guess layer to be used as an independent dependency.
Key Changes:
- Extracted mime-guess layer implementation into a new crate at
core/layers/mime-guess/ - Updated imports from
crate::toopendal_core::throughout the layer code - Modified the main crate to re-export the new
opendal-layer-mime-guesscrate
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| core/src/lib.rs | Added re-export of the new opendal-layer-mime-guess crate in the layers module |
| core/layers/mime-guess/src/lib.rs | Updated imports to use opendal_core namespace and fixed documentation URL to point to external docs.rs link |
| core/layers/mime-guess/Cargo.toml | Created new Cargo manifest for the standalone mime-guess layer crate with proper dependencies |
| core/core/src/layers/mod.rs | Removed the inline mime_guess module definition from the core crate |
| core/core/Cargo.toml | Removed the layers-mime-guess feature flag and mime_guess dependency from core |
| core/Cargo.toml | Added opendal-layer-mime-guess as a new optional dependency and updated the feature flag to reference it |
| core/Cargo.lock | Updated dependency graph to reflect the new crate structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d28f7d8 to
90a4400
Compare
Xuanwo
approved these changes
Dec 11, 2025
Member
Xuanwo
left a comment
There was a problem hiding this comment.
Thank you for working on this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
part of #6829
Closes #6941
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?