crate_version_parse

Crates.iocrate_version_parse
lib.rscrate_version_parse
version0.2.0
sourcesrc
created_at2020-02-08 01:40:05.293676
updated_at2020-02-27 14:05:59.141973
descriptionsimply parses crate-semver from a string
homepage
repositoryhttps://github.com/museun/crate_version_parse
max_upload_size
id206250
size8,961
(museun)

documentation

https://docs.rs/crate_version_parse

README

crate_version_parse

Crates Documentation Actions

A crate name and version parser

Features

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

Commit count: 8

cargo fmt