Skip to content

Commit

Permalink
fix: Force structures to be Copy instead of Clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Feb 10, 2019
1 parent c654971 commit 86b5bbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
//!
//! // `Clone` is required for `RdxSort`
//! // `PartialEq` is only required for the equality assert, not for the actual sorting
//! #[derive(Clone, PartialEq)]
//! #[derive(Copy, Clone, PartialEq)]
//! struct Foo {
//! a: u8,
//! b: u8,
Expand Down
4 changes: 2 additions & 2 deletions src/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn helper_bucket<T, I>(buckets_b: &mut Vec<Vec<T>>, iter: I, cfg_nbuckets: usize
}

impl<T> RdxSort for [T]
where T: Rdx + Clone
where T: Rdx + Copy
{
fn rdxsort(&mut self) {
// config
Expand Down Expand Up @@ -94,7 +94,7 @@ impl<T> RdxSort for [T]
}

impl<T> RdxSort for Vec<T>
where [T]: RdxSort
where T: Rdx + Copy
{
fn rdxsort(&mut self) {
self.as_mut_slice().rdxsort();
Expand Down

0 comments on commit 86b5bbf

Please sign in to comment.