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.84k stars 352 forks source link

Remove ref_slice example #365

Closed BD103 closed 1 year ago

BD103 commented 1 year ago

ref_slice is deprecated and its functionality has been added to the standard library. This PR simply removes it as an example from the "Prefer Small Crates" page.

Other considerations

Would it be useful to add a note redirecting to the std implementation, or should the example just be removed entirely?


I'm new to contributing here. I've read CONTRIBUTING.md, but I'm unable to run markdownlint on my current device. If you need me to do this or anything else, please ask!

neithernut commented 1 year ago

Although the crate is now deprecated, it still makes for a good, useful example imo. But I do see the merit of at least adding a note marking it as a "historical" example. I don't thing a link to the function in std is necessary, though.

BD103 commented 1 year ago

What do you suggest I do instead? We could move the example to the bottom of the list and add (historical) next to it.

If this were done, I'd either need to revert the previous commit or create a new PR. I don't know how much keeping the commit history clean is important for this project though.

neithernut commented 1 year ago

What do you suggest I do instead? We could move the example to the bottom of the list and add (historical) next to it.

Yes, for example.

If this were done, I'd either need to revert the previous commit or create a new PR. I don't know how much keeping the commit history clean is important for this project though.

I'm not a maintainer :sweat_smile:, but CONTRIBUTING.md says you shouldn't force-push (and start with a draft-PR). But instead of creating a new PR, you could revert your one commit and then mark the reference. The maintainers will then likely request that you sqash the revert (and then do force-push) after its gone through review.

BD103 commented 1 year ago

Ok, this PR is ready for review. I'll see if I can get in contact with a maintainer to merge it.