Skip to content

Commit

Permalink
fix: clippy nightly concerns fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jhellerstein committed Oct 22, 2024
1 parent 2be17ac commit b7e0337
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
9 changes: 3 additions & 6 deletions lattices/src/ght_lazy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use crate::ght::{GeneralizedHashTrieNode, GhtGet, GhtInner, GhtLeaf};
/// starting with a trie of height 0 and continuing until a trie of height |key| - 1.
/// Our `force` method does not add a node above a leaf L as in the paper. Instead
/// it `take`s L from the current trie and merges it into the next trie to the right which is 1 taller.
/// A trait for the behavior we need from the nodes in a COLT forest. Every `ColtForestNode`
///
/// This trait provides the behavior we need from the nodes in a COLT forest. Every `ColtForestNode`
/// is a `GeneralizedHashTrieNode` with some extra methods.
pub trait ColtForestNode: GeneralizedHashTrieNode {
/// result of `force`ing a node
Expand Down Expand Up @@ -99,7 +99,6 @@ pub trait ColtGet {
type Schema: VariadicExt + Eq + Hash + Clone;
/// The type of Storage
/// This type is the same in all Tries and nodes of the COLT
type Storage: VariadicCollection;
/// SuffixSchema variadic: the suffix of the schema *from this node of the trie
/// downward*. The first entry in this variadic is of type Head.
Expand Down Expand Up @@ -298,9 +297,7 @@ where
self.0.children.keys().cloned()
}
}
impl<'a, Head, Schema, ValType, Storage>
ColtGetTail<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>>
for var_type!(&'a mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>)
impl<Head, Schema, ValType, Storage> ColtGetTail<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>> for var_type!(&mut GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>)
where
GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>: GeneralizedHashTrieNode<Head = Head>
// + crate::Merge<GhtInner<Head, GhtLeaf<Schema, ValType, Storage>>>
Expand Down
1 change: 0 additions & 1 deletion lattices/src/ght_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ macro_rules! GhtType {
///
/// type MyColt = ColtType!(u16, u32, u64);
/// ```
macro_rules! ColtType {
// Base case: single type to empty
($a:ty => ()) => {
Expand Down
4 changes: 2 additions & 2 deletions lattices/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ pub fn cartesian_power<T, const N: usize>(
(size, Some(size))
}
}
impl<'a, T, const N: usize> ExactSizeIterator for CartesianPower<'a, T, N> {}
impl<'a, T, const N: usize> Clone for CartesianPower<'a, T, N> {
impl<T, const N: usize> ExactSizeIterator for CartesianPower<'_, T, N> {}
impl<T, const N: usize> Clone for CartesianPower<'_, T, N> {
fn clone(&self) -> Self {
Self {
items: self.items,
Expand Down
5 changes: 2 additions & 3 deletions lattices/src/vec_union.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ where
if self.vec.len() != other.vec.len() {
return false;
}
return self
.vec
self.vec
.iter()
.zip(other.vec.iter())
.all(|(val_self, val_other)| val_self == val_other);
.all(|(val_self, val_other)| val_self == val_other)
}
}

Expand Down

0 comments on commit b7e0337

Please sign in to comment.