rust-unofficial / patterns

A catalogue of Rust design patterns, anti-patterns and idioms
https://rust-unofficial.github.io/patterns/
Mozilla Public License 2.0
7.85k stars 354 forks source link

[idioms/ctor] adds default constructor section #280

Closed wookietreiber closed 2 years ago

wookietreiber commented 2 years ago

First, I replaced the Vec example with Second. This is easier to comprehend compared to the more complex Vec example. It's also testable because it doesn't rely on RawVec.


Discussion: https://github.com/rust-unofficial/patterns/discussions/276

simonsan commented 2 years ago

@wookietreiber Please don't force-push the branch, so we can keep review history.

simonsan commented 2 years ago

Anything else to add? @wookietreiber @pickfire @MarcoIeni

MarcoIeni commented 2 years ago

simonsan, I think you should revert b27ced543260aa24529d0073fa422b6da2e9e19a As you can see from here those links are not visualized correctly. They were just pointers from links already present in the document.

simonsan commented 2 years ago

simonsan, I think you should revert b27ced5 As you can see from here those links are not visualized correctly. They were just pointers from links already present in the document.

Yeah, thought you could do both, show the nicely in raw and have them still as links in the document :(

MarcoIeni commented 2 years ago

Thanks everyone, especially wookietreiber :D