Skip to content

Commit

Permalink
Copy by reference
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru committed Feb 8, 2024
1 parent 80d5ae2 commit 0233b2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ mod tests {

impl<'a> CopyOnto<PersonRegion> for &'a Person {
fn copy_onto(self, target: &mut PersonRegion) -> <PersonRegion as Region>::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)
Expand Down

0 comments on commit 0233b2b

Please sign in to comment.