rushmorem / publicsuffix

An implementation of Mozilla's Public Suffix List in Rust
MIT License
96 stars 17 forks source link

Patch release 1.5.5 has a breaking change #35

Closed rusty-snake closed 3 years ago

rusty-snake commented 3 years ago

71207306ab2ec9618a1c74211e3b0c0ca5328aa4 moved List::from_str behind std::str::FromStr. This breaks the build if there is no use std::str::FromStr already in the code.

If such a change is done again in the future, please make either a new major release (https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field) or keep a (deprecated) from_str alias.

#[deprecated(
    since = "1.5.5",
    note = "Use std::str::FromStr::from_str instead"
)]
pub fn from_str(string: &str) -> Result<List> {
    <Self as FromStr>::from_str(string)
}
sagebind commented 3 years ago

I just ran into this today as well in one of my crates. It is trivial to fix, but personally I would restore the method like @rusty-snake suggests and yank the version with the breaking change.

rushmorem commented 3 years ago

I'm sorry, that was an oversight on my part. I have undone that particular change and yanked v1.5.5.