mirror of
https://github.com/rust-lang/cargo
synced 2024-08-28 03:39:31 +00:00
refactor: give some better examples for package ID spec
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
d45969a781
commit
ad18dd017b
|
@ -64,13 +64,15 @@ impl PackageIdSpec {
|
|||
/// use cargo_util_schemas::core::PackageIdSpec;
|
||||
///
|
||||
/// let specs = vec![
|
||||
/// "https://crates.io/foo",
|
||||
/// "https://crates.io/foo#1.2.3",
|
||||
/// "https://crates.io/foo#bar:1.2.3",
|
||||
/// "https://crates.io/foo#bar@1.2.3",
|
||||
/// "foo",
|
||||
/// "foo@1.4",
|
||||
/// "foo@1.4.3",
|
||||
/// "foo:1.2.3",
|
||||
/// "foo@1.2.3",
|
||||
/// "https://github.com/rust-lang/crates.io-index#foo",
|
||||
/// "https://github.com/rust-lang/crates.io-index#foo@1.4.3",
|
||||
/// "ssh://git@github.com/rust-lang/foo.git#foo@1.4.3",
|
||||
/// "file:///path/to/my/project/foo",
|
||||
/// "file:///path/to/my/project/foo#1.1.8"
|
||||
/// ];
|
||||
/// for spec in specs {
|
||||
/// assert!(PackageIdSpec::parse(spec).is_ok());
|
||||
|
|
Loading…
Reference in a new issue