Skip to content

Commit

Permalink
Auto merge of #13202 - hi-rustin:rustin-patch-spec-example, r=weihanglo
Browse files Browse the repository at this point in the history
refactor: give some better examples for package ID spec
  • Loading branch information
bors committed Dec 25, 2023
2 parents c2408a7 + ad18dd0 commit 4e792c2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions crates/cargo-util-schemas/src/core/package_id_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 4e792c2

Please sign in to comment.