From 1deeb761baf74b28b02caaa1a9f51db969472f07 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Tue, 17 Dec 2024 20:39:04 +0100 Subject: [PATCH] Switch to AsRef --- purl/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/purl/src/lib.rs b/purl/src/lib.rs index 8a273f5..eaeada7 100644 --- a/purl/src/lib.rs +++ b/purl/src/lib.rs @@ -329,10 +329,10 @@ impl Purl { namespaced_name: S, ) -> PurlBuilder where - S: Into, + S: AsRef, { // 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)