Skip to content

Commit f8a7092

Browse files
authored
Merge pull request #29 from WhyNotHugo/cleanups
Cleanups
2 parents 676ddb1 + 165b870 commit f8a7092

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

alpm-utils/src/depends.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use alpm::{AsDep, DepModVer, Ver};
22

33
/// Checks if a dependency is satisfied by a package (name + version).
4-
pub fn satisfies_dep<'a, S: AsRef<str>, V: AsRef<Ver>>(
4+
pub fn satisfies_dep<S: AsRef<str>, V: AsRef<Ver>>(
55
dep: impl AsDep,
66
name: S,
77
version: V,
@@ -36,7 +36,7 @@ pub fn satisfies_provide(dep: impl AsDep, provide: impl AsDep) -> bool {
3636
}
3737

3838
/// Checks if a Dep is satisfied by a name + version + provides combo
39-
pub fn satisfies<'a, D: AsDep, S: AsRef<str>, V: AsRef<Ver>>(
39+
pub fn satisfies<D: AsDep, S: AsRef<str>, V: AsRef<Ver>>(
4040
dep: impl AsDep,
4141
name: S,
4242
version: V,
@@ -47,7 +47,7 @@ pub fn satisfies<'a, D: AsDep, S: AsRef<str>, V: AsRef<Ver>>(
4747
}
4848

4949
/// Checks if a Dep is satisfied by a name + provides (ignoring version) combo
50-
pub fn satisfies_nover<'a, D: AsDep, S: AsRef<str>>(
50+
pub fn satisfies_nover<D: AsDep, S: AsRef<str>>(
5151
dep: impl AsDep,
5252
name: S,
5353
mut provides: impl Iterator<Item = D>,
@@ -57,7 +57,7 @@ pub fn satisfies_nover<'a, D: AsDep, S: AsRef<str>>(
5757
}
5858

5959
/// Checks if a dependency is satisfied by a package (name only).
60-
pub fn satisfies_dep_nover<'a, S: AsRef<str>>(dep: impl AsDep, name: S) -> bool {
60+
pub fn satisfies_dep_nover<S: AsRef<str>>(dep: impl AsDep, name: S) -> bool {
6161
dep.as_dep().name() == name.as_ref()
6262
}
6363

alpm-utils/src/target.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ impl<T> AsTarg for T
1010
where
1111
T: AsRef<str>,
1212
{
13-
fn as_targ<'a>(&'a self) -> Targ<'a> {
13+
fn as_targ(&self) -> Targ {
1414
Targ::from(self.as_ref())
1515
}
1616
}

alpm/examples/callbacks.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ fn main() {
4444
handle
4545
.register_syncdb("community", SigLevel::USE_DEFAULT)
4646
.unwrap();
47+
48+
println!("final value of number was: {}", number.borrow())
4749
}

alpm/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ impl<'a> fmt::Debug for Group<'a> {
989989
}
990990

991991
impl<'a> Group<'a> {
992-
pub(crate) unsafe fn new<'b>(handle: &'b Alpm, ptr: *mut alpm_group_t) -> Group<'b> {
992+
pub(crate) unsafe fn new(handle: &Alpm, ptr: *mut alpm_group_t) -> Group {
993993
Group {
994994
handle,
995995
inner: NonNull::new_unchecked(ptr),
@@ -1042,7 +1042,7 @@ impl<'a> Read for ChangeLog<'a> {
10421042
}
10431043

10441044
impl<'a> ChangeLog<'a> {
1045-
pub(crate) unsafe fn new<'b>(pkg: Pkg<'b>, ptr: *mut c_void) -> ChangeLog<'b> {
1045+
pub(crate) unsafe fn new(pkg: Pkg, ptr: *mut c_void) -> ChangeLog {
10461046
ChangeLog {
10471047
pkg,
10481048
stream: NonNull::new_unchecked(ptr),

0 commit comments

Comments
 (0)