diff --git a/src/volume/mod.rs b/src/volume/mod.rs index 98192c2..898c324 100644 --- a/src/volume/mod.rs +++ b/src/volume/mod.rs @@ -227,7 +227,8 @@ impl DerefMut for VolumeCommit { macro_rules! impl_slice { (@inner $volume:ty $( , $lt:lifetime )* ) => { - impl<$( $lt, )* S: Size + PartialOrd + Copy, T> Volume> for $volume + impl<$( $lt, )* S: Size + PartialOrd + Copy, T> Volume> + for $volume where T: Clone, [T]: ToOwned, @@ -235,10 +236,15 @@ macro_rules! impl_slice { type Error = Infallible; fn len(&self) -> Length> { - Length::Bounded(Address::from(>::as_ref(self).len())) + Length::Bounded( + Address::from(>::as_ref(self).len()) + ) } - fn commit(&mut self, slice: Option>>) -> Result<(), Infallible> { + fn commit( + &mut self, + slice: Option>>, + ) -> Result<(), Infallible> { slice.map(|slice| { let index = slice.at_index().index64() as usize; let end = index + slice.as_ref().len(); @@ -256,7 +262,8 @@ macro_rules! impl_slice { range: Range>, ) -> VolumeSlice<'a, T, Address> { let index = range.start; - let range = range.start.index64() as usize..range.end.index64() as usize; + let range = range.start.index64() as usize + ..range.end.index64() as usize; VolumeSlice::new( >::as_ref(self).get_unchecked(range), index,