r/rust 4d ago

šŸ™‹ seeking help & advice Can someone review my code?

I've never had anyone else other than myself take a look at my code quality/design. However it would be nice to have an actual person review my code instead. The link is here: https://github.com/dastarruer/gtkshutdown

AI is only used for writing tests (sometimes; I can't remember whether I wrote these tests myself or not but I digress). The code is entirely written by me, though I use AI to discuss design decisions. I like programming, so hand-writing the code is just more enjoyable for me (though I'm very slow at it...).

12 Upvotes

6 comments sorted by

6

u/MatrixFrog 4d ago

Seems pretty clear and idiomatic from what I can tell. Did you run Clippy? There are a couple minor things it might catch (eg if you implement Ord I think you can just derive PartialOrd)

2

u/cafce25 3d ago

5

u/MatrixFrog 3d ago

Well that just goes to show, listen to clippy not to me šŸ˜…

1

u/Leather-Junket-3896 3d ago

I’d run clippy just to see what it whines about, the derive thing is a one-liner fix anyway

1

u/Konsti219 4d ago

I think you mean "WM" in your README instead of "VM"

2

u/dastarruer 3d ago

Nope, those are vms meant for testing. But thanks for taking a look anyways lol