From 144ced6de54ef4862352c41ddb7a3c744d420d77 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Mon, 27 Nov 2023 01:24:14 +0000 Subject: [PATCH] Drop Targ generics Again a breaking change but was broken before --- alpm-utils/src/target.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/alpm-utils/src/target.rs b/alpm-utils/src/target.rs index 3d9c31d..3beb2d1 100644 --- a/alpm-utils/src/target.rs +++ b/alpm-utils/src/target.rs @@ -26,7 +26,7 @@ pub struct Target { impl AsTarg for Target { fn as_targ(&self) -> Targ { - Targ::new(self.repo.as_ref(), &self.pkg) + Targ::new(self.repo.as_deref(), &self.pkg) } } @@ -51,11 +51,8 @@ pub struct Targ<'a> { impl<'a> Targ<'a> { /// Create a new Targ. - pub fn new>(repo: Option, pkg: S) -> Targ<'a> { - Targ { - repo: repo.map(AsRef::as_ref), - pkg: pkg.as_ref(), - } + pub fn new(repo: Option<&'a str>, pkg: &'a str) -> Targ<'a> { + Targ { repo, pkg } } }