book icon indicating copy to clipboard operation
book copied to clipboard

ch05 01 Creating Instances From Other Instances With Struct Update Syntax

Open whym1here opened this issue 3 years ago • 0 comments

  • [x] I have checked the latest main branch to see if this has already been fixed
  • [x] I have searched existing issues and pull requests for duplicates

URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struct-update-syntax

Description of the problem: The book suggest if we create a struct using .. operator with another struct then the previous struct cannot be used if it has data type that are moved by = assignment operator.

Suggested fix: I am not really sure about the change as I am new to rust

whym1here avatar Aug 08 '22 10:08 whym1here