diff --git a/src/lib.rs b/src/lib.rs index bbc1c20..5c5ee07 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -368,7 +368,7 @@ mod tests { impl<'a> CopyOnto for &'a Person { fn copy_onto(self, target: &mut PersonRegion) -> ::Index { - let name = self.name.copy_onto(&mut target.name_container); + let name = (&self.name).copy_onto(&mut target.name_container); let age = self.age.copy_onto(&mut target.age_container); let hobbies = (&self.hobbies).copy_onto(&mut target.hobbies); (name, age, hobbies)