Skip to content

Commit

Permalink
Switch to AsRef
Browse files Browse the repository at this point in the history
  • Loading branch information
cd-work committed Dec 17, 2024
1 parent 56c8ff4 commit 1deeb76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions purl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ impl Purl {
namespaced_name: S,
) -> PurlBuilder
where
S: Into<SmallString>,
S: AsRef<str>,
{
// Split apart namespace and name based on ecosystem.
let namespaced_name = namespaced_name.into();
let namespaced_name = namespaced_name.as_ref();
let (namespace, name) = match package_type {
PackageType::Cargo | PackageType::Gem | PackageType::NuGet | PackageType::PyPI => {
(None, namespaced_name)
Expand Down

0 comments on commit 1deeb76

Please sign in to comment.