I think there is no ambiguity in from_str as a method name so "choose a
less ambiguous method name" is unnecessary, and it can't be a FromStr
impl in this case because FromStr's error type cannot borrow from the
input string slice.
warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`
--> serde_derive_internals/src/case.rs:50:5
|
50 | / pub fn from_str(rename_all_str: &str) -> Result<Self, ParseError> {
51 | | for (name, rule) in RENAME_RULES {
52 | | if rename_all_str == *name {
53 | | return Ok(*rule);
... |
58 | | })
59 | | }
| |_____^
|
= note: `#[warn(clippy::should_implement_trait)]` on by default
= help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
The builtin visitor is fairly expensive to compile (3700 lines of code),
particularly if something else in the dependency graph also enables
syn/full. For the usage in serde_derive, it turns out to be easy to
replace.
The following changes are included:
- Delete per-file license notices at the top of each file.
- Delete the first paragraph of LICENSE-MIT (an inaccurate
pseudo-copyright line), leaving only the text of the MIT license.
Nothing about the license of Serde code has changed, only our
understanding of how to correctly communicate that license has changed.
This mirrors an equivalent change being applied in the rust-lang/rust
repository.
We can continue to publish serde_derive_internals independently but
serde_derive no longer has a dependency on it. This improves compile
time of serde_derive by 7%.