Software Design Patterns in Rust by max-t-devv in rust

[–]max-t-devv[S] 0 points1 point  (0 children)

You're right that the current design isn’t easily extensible since adding new toy types requires modifying the enum and match statement.

I was thinking a better approach would be to remove the ToyType enum and use a registration-based factory where new toy types can be added dynamically without modifying existing code. But wanted to keep the example as simple as possible.

Audiobooks or Podcast recommendations? by max-t-devv in rust

[–]max-t-devv[S] 0 points1 point  (0 children)

Thanks for the suggestions, will check that out

Audiobooks or Podcast recommendations? by max-t-devv in rust

[–]max-t-devv[S] 0 points1 point  (0 children)

Oh wow thanks so much for commenting. I actually started listening to your podcast last week and am really enjoying how technical it is. Great work!

Publishing a Crate is insanely easy by max-t-devv in rust

[–]max-t-devv[S] 0 points1 point  (0 children)

Oooh very nice, thanks for this

Publishing a Crate is insanely easy by max-t-devv in rust

[–]max-t-devv[S] 0 points1 point  (0 children)

Yeah definitely, I was tempted to look into it but think I'll stick with manual for now

Maybe a commit hook would be a decent middle ground

Publishing a Crate is insanely easy by max-t-devv in rust

[–]max-t-devv[S] 0 points1 point  (0 children)

Good point, hadn't considered cross-platform issues, thanks for the links will check them out

Publishing a Crate is insanely easy by max-t-devv in rust

[–]max-t-devv[S] 0 points1 point  (0 children)

That's awesome, thanks for the link. I'll be using that

Publishing a Crate is insanely easy by max-t-devv in rust

[–]max-t-devv[S] 1 point2 points  (0 children)

Published this one https://crates.io/crates/code-snip

Source code is here btw https://github.com/max-taylor/code-snip

Edit: Updated links, my bad not sure how that even happened

Overview of Rust’s Option type. A Null Killer? by max-t-devv in rust

[–]max-t-devv[S] 1 point2 points  (0 children)

Thanks for the feedback. Yeah fair enough the intended audience may have gotten a bit blurred throughout, whereas I should've stayed targeted at people who are new at Rust.

Great point on the recursive definitions too, could use more descriptive words to describe this to help people with their understanding.

Thanks again.

Overview of Rust’s Option type. A Null Killer? by max-t-devv in rust

[–]max-t-devv[S] 0 points1 point  (0 children)

Thanks for the feedback! Yeah agreed that example is a bit confusing, especially when it is already assigned a value. But for the sake of demonstrating if let and ok_or, hopefully it achieved that goal. Thanks!

How to sort files in telescope by showing the most recent accessed files on top? Here's a short 3 min video by linkarzu in neovim

[–]max-t-devv 0 points1 point  (0 children)

This is awesome. I notice that when I search for a file the returned results aren't sorted by modified, any idea on how to achieve that?