Skip to content

Commit 144ced6

Browse files
committed
Drop Targ generics
Again a breaking change but was broken before
1 parent d5ff5e3 commit 144ced6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

alpm-utils/src/target.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct Target {
2626

2727
impl AsTarg for Target {
2828
fn as_targ(&self) -> Targ {
29-
Targ::new(self.repo.as_ref(), &self.pkg)
29+
Targ::new(self.repo.as_deref(), &self.pkg)
3030
}
3131
}
3232

@@ -51,11 +51,8 @@ pub struct Targ<'a> {
5151

5252
impl<'a> Targ<'a> {
5353
/// Create a new Targ.
54-
pub fn new<S: AsRef<str>>(repo: Option<S>, pkg: S) -> Targ<'a> {
55-
Targ {
56-
repo: repo.map(AsRef::as_ref),
57-
pkg: pkg.as_ref(),
58-
}
54+
pub fn new(repo: Option<&'a str>, pkg: &'a str) -> Targ<'a> {
55+
Targ { repo, pkg }
5956
}
6057
}
6158

0 commit comments

Comments
 (0)