Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Morganamilo committed Mar 5, 2024
1 parent fb84f5b commit 9c9855f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions alpm-utils/src/depends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn satisfies_provide(dep: impl AsRef<Dep>, provide: impl AsRef<Dep>) -> bool
}

/// Checks if a Dep is satisfied by a name + version + provides combo
pub fn satisfies<'a, D: AsRef<Dep>, S: AsRef<str>, V: AsRef<Ver>>(
pub fn satisfies<D: AsRef<Dep>, S: AsRef<str>, V: AsRef<Ver>>(
dep: impl AsRef<Dep>,
name: S,
version: V,
Expand All @@ -47,7 +47,7 @@ pub fn satisfies<'a, D: AsRef<Dep>, S: AsRef<str>, V: AsRef<Ver>>(
}

/// Checks if a Dep is satisfied by a name + provides (ignoring version) combo
pub fn satisfies_nover<'a, D: AsRef<Dep>, S: AsRef<str>>(
pub fn satisfies_nover<D: AsRef<Dep>, S: AsRef<str>>(
dep: impl AsRef<Dep>,
name: S,
mut provides: impl Iterator<Item = D>,
Expand All @@ -57,7 +57,7 @@ pub fn satisfies_nover<'a, D: AsRef<Dep>, S: AsRef<str>>(
}

/// Checks if a dependency is satisfied by a package (name only).
pub fn satisfies_dep_nover<'a, S: AsRef<str>>(dep: impl AsRef<Dep>, name: S) -> bool {
pub fn satisfies_dep_nover<S: AsRef<str>>(dep: impl AsRef<Dep>, name: S) -> bool {
dep.as_ref().name() == name.as_ref()
}

Expand Down
5 changes: 1 addition & 4 deletions alpm/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ unsafe impl<'l, T: Sync> Sync for AlpmList<'l, T> {}

impl<'l, T> Clone for AlpmList<'l, T> {
fn clone(&self) -> Self {
AlpmList {
list: self.list,
_marker: PhantomData,
}
*self
}
}

Expand Down
2 changes: 1 addition & 1 deletion alpm/src/list_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ unsafe impl<'a> IntoAlpmListPtr for DbMut<'a> {
}
}

unsafe impl<'a> IntoAlpmListPtr for DependMissing {
unsafe impl IntoAlpmListPtr for DependMissing {
type Output = Self;
fn as_ptr(&self) -> *mut c_void {
DepMissing::as_ptr(self) as _
Expand Down

0 comments on commit 9c9855f

Please sign in to comment.