We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5ff5e3 commit 144ced6Copy full SHA for 144ced6
alpm-utils/src/target.rs
@@ -26,7 +26,7 @@ pub struct Target {
26
27
impl AsTarg for Target {
28
fn as_targ(&self) -> Targ {
29
- Targ::new(self.repo.as_ref(), &self.pkg)
+ Targ::new(self.repo.as_deref(), &self.pkg)
30
}
31
32
@@ -51,11 +51,8 @@ pub struct Targ<'a> {
51
52
impl<'a> Targ<'a> {
53
/// 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
- }
+ pub fn new(repo: Option<&'a str>, pkg: &'a str) -> Targ<'a> {
+ Targ { repo, pkg }
59
60
61
0 commit comments