3 unstable releases
0.2.0 | Feb 27, 2020 |
---|---|
0.1.1 | Feb 8, 2020 |
0.1.0 | Feb 8, 2020 |
#2522 in Development tools
76 downloads per month
Used in 4 crates
(via cargo-whatfeatures)
8KB
115 lines
crate_version_parse
A crate name and version parser
Features
serde
enables serde supportstd
to enablestd::error::Error
Example
let input = "zstd-sys-1.4.15+zstd.1.4.4";
let crate_ = CrateVersion::try_parse(input).unwrap();
assert_eq!(crate_.name, "zstd-sys");
assert_eq!(crate_.version, "1.4.15+zstd.1.4.4");
let input = "wasi-0.9.0+wasi-snapshot-preview1";
let crate_ = CrateVersion::try_parse(input).unwrap();
assert_eq!(crate_.name, "wasi");
assert_eq!(crate_.version, "0.9.0+wasi-snapshot-preview1");
let input = "winapi-i686-pc-windows-gnu-0.4.0";
let crate_ = CrateVersion::try_parse(input).unwrap();
assert_eq!(crate_.name, "winapi-i686-pc-windows-gnu");
assert_eq!(crate_.version, "0.4.0");
License: 0BSD
Dependencies
~165KB