Skip to content

Commit

Permalink
handle warnings from nightly clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jul 9, 2022
1 parent 16ac523 commit 34e1b87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub enum TernaryTreeList<T> {

use TernaryTreeList::*;

impl<'a, T> TernaryTreeList<T>
impl<T> TernaryTreeList<T>
where
T: Clone + Display + Eq + PartialEq + Debug + Ord + PartialOrd + Hash,
{
Expand Down Expand Up @@ -135,7 +135,7 @@ where
Empty => Err(String::from("empty")),
Tree(t) => {
if idx > self.len() - 1 {
return Err(format!("Index too large {} for {}", idx, self.format_inline()));
Err(format!("Index too large {} for {}", idx, self.format_inline()))
} else {
Ok(TernaryTreeList::Tree(t.assoc(idx, item)?))
}
Expand Down
2 changes: 1 addition & 1 deletion src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ where
loop {
match tree_parent.get() {
Leaf(value) => {
return &*value;
return value;
}
Branch2 { left, middle, .. } => {
if idx < left.len() {
Expand Down
2 changes: 1 addition & 1 deletion src/tree/finger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::sync::Arc;

use crate::util::triple_size;

impl<'a, T> TernaryTree<T>
impl<T> TernaryTree<T>
where
T: Clone + Display + Eq + PartialEq + Debug + Ord + PartialOrd + Hash,
{
Expand Down

0 comments on commit 34e1b87

Please sign in to comment.