Make utf8parse dependency optional#219
Make utf8parse dependency optional#219mondeja wants to merge 1 commit intorust-cli:mainfrom mondeja:utf8parse-optional
utf8parse dependency optional#219Conversation
| #[cfg(feature = "utf8")] | ||
| #[inline] | ||
| pub fn strip_bytes(data: &[u8]) -> StrippedBytes<'_> { |
There was a problem hiding this comment.
Taking built-in functionality and putting it behind a feature is a breaking change as it may break people who use default-features = false
| default = ["auto", "wincon", "utf8"] | ||
| auto = ["dep:anstyle-query"] | ||
| wincon = ["dep:anstyle-wincon"] | ||
| utf8 = ["dep:utf8parse", "anstyle-parse/utf8"] |
There was a problem hiding this comment.
This feature name doesn't do a good job of describing what you are getting / losing imo
| default = ["auto", "wincon", "utf8"] | ||
| auto = ["dep:anstyle-query"] | ||
| wincon = ["dep:anstyle-wincon"] | ||
| utf8 = ["dep:utf8parse", "anstyle-parse/utf8"] |
There was a problem hiding this comment.
In general, I worry that this is an implementation detail and could change and you could lose the benefit
|
While I've started responding, the core of this really should be discussed in an issue per our contributing guidelines
I'm going to go ahead and close in favor of an issue. What I would recommend focusing the issue on is why this is a problem. As-is, I'm not convinced this is worth doing. |
Makes the
utf8parsedependency optional without introducing breaking changes. So I can use in my crate:and the
utf8parsedependency will not be downloaded.