From bde99a0d6c58f4cbfefcd49961d51ec09bfa3f22 Mon Sep 17 00:00:00 2001 From: Matthew Donoughe Date: Tue, 4 Apr 2023 16:17:05 -0400 Subject: [PATCH] use valid package name --- purl/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/purl/src/lib.rs b/purl/src/lib.rs index 050651a..3fcdcf7 100644 --- a/purl/src/lib.rs +++ b/purl/src/lib.rs @@ -232,12 +232,10 @@ pub struct PurlParts { /// use phylum_purl::{PackageType, Purl}; /// /// // Use the builder if you want to set fields besides the type and name. -/// let purl = Purl::builder(PackageType::Npm, "@my-company/my-package") -/// .with_version(Some("1.2.3")) -/// .build() -/// .unwrap(); +/// let purl = +/// Purl::builder(PackageType::Npm, "my-package").with_version(Some("1.2.3")).build().unwrap(); /// -/// assert_eq!("pkg:npm/%40my-company%2Fmy-package@1.2.3", &purl.to_string()); +/// assert_eq!("pkg:npm/my-package@1.2.3", &purl.to_string()); /// ``` /// /// # See also