Skip to content

Commit

Permalink
clippy: cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
marieaurore123 committed Oct 17, 2024
1 parent 690027c commit cca6059
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rig-core/src/embeddings/embeddable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl<T: Clone> OneOrMany<T> {

pub fn all(&self) -> Vec<T> {
let mut all = vec![self.first.clone()];
all.extend(self.rest.clone().into_iter());
all.extend(self.rest.clone());
all
}
}
Expand All @@ -89,9 +89,9 @@ impl<T> TryFrom<Vec<T>> for OneOrMany<T> {
first: match iter.next() {
Some(item) => item,
None => {
return Err(EmbeddableError::Error(format!(
"Cannot convert empty Vec to OneOrMany"
)))
return Err(EmbeddableError::Error(
"Cannot convert empty Vec to OneOrMany".to_string(),
))
}
},
rest: iter.collect(),
Expand Down

0 comments on commit cca6059

Please sign in to comment.