Repository: achanda/ipnetwork (language: rust)

Issue:
This crate's Cargo.toml claims to support serde < 1.0 but it doesn't
This crate's `Cargo.toml` says `serde_derive = ">=0.8.0, <2.0"`, but this crate does not compile if Cargo selects serde 0.8.

It just happens to work usually because `cargo publish` runs `cargo update`, and people tend to keep packages up to date. I've encountered this often because I build this crate in a project that contains another dependency that only supports serde 0.8, and sometimes Cargo assigns serde 0.8 to this crate as well. This results in suprious build errors.

I'm happy to write a PR to fix this, but the version specification `">=0.8.0, <2.0"` is so specific and unique that I'd like to understand why this came about first.


Discussion / hints:

Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index c1f38f5..4d219db 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,11 +11,11 @@ categories = ["network-programming", "parser-implementations"]
 edition = "2018"
 
 [dependencies]
-serde = { version = ">=0.8.0, <2.0", optional = true }
+serde = { version = "1", optional = true }
 
 [dev-dependencies]
 serde_json = "1.0"
-serde_derive = ">=0.8.0, <2.0"
+serde_derive = "1"
 criterion = "0.3.0"
 
 [badges]


Test patch: