Skip to content

Commit

Permalink
restricting TryClone to T: Copy as T: Clone is fallible
Browse files Browse the repository at this point in the history
  • Loading branch information
amunra committed Oct 8, 2024
1 parent a286993 commit 1bac60d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl<T: Clone, A: Allocator> Vec<T, A> {
}
}

impl<T: Clone, A: Allocator + Clone> TryClone for Vec<T, A> {
impl<T: Copy, A: Allocator + Clone> TryClone for Vec<T, A> {
type Error = TryReserveError;

fn try_clone(&self) -> Result<Self, Self::Error> {
Expand Down

0 comments on commit 1bac60d

Please sign in to comment.