We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01cc982 commit 6b0c2fdCopy full SHA for 6b0c2fd
src/libcore/slice/mod.rs
@@ -1642,8 +1642,8 @@ impl<T> [T] {
1642
/// [`split_at_mut`]: #method.split_at_mut
1643
#[stable(feature = "copy_from_slice", since = "1.9.0")]
1644
pub fn copy_from_slice(&mut self, src: &[T]) where T: Copy {
1645
- assert!(self.len() == src.len(),
1646
- "destination and source slices have different lengths");
+ assert_eq!(self.len(), src.len(),
+ "destination and source slices have different lengths");
1647
unsafe {
1648
ptr::copy_nonoverlapping(
1649
src.as_ptr(), self.as_mut_ptr(), self.len());
0 commit comments