minus-squareal4s@feddit.orgtoRust Programming@lemmy.ml•Which code style to initialize structs?linkfedilinkarrow-up1·6 months agoDefinitely the second one. It avoids Mut It makes clear that the initialization is over at the end of of the statement. The first option invites people to change some more properties hundreds of lines down where you won’t see them. linkfedilink
Definitely the second one.