mirror of
https://github.com/gopher64/gopher64.git
synced 2026-04-25 15:06:00 +03:00
[PR #614] [MERGED] unsolicited main.rs refactor #642
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gopher64#642
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/gopher64/gopher64/pull/614
Author: @AdamSteinberg1
Created: 11/8/2025
Status: ✅ Merged
Merged: 11/8/2025
Merged by: @loganmc10
Base:
main← Head:main📝 Commits (3)
592ad79main.rs refactorf424fd7remove anyhow13b0392forgive me clippy, for I have sinned📊 Changes
1 file changed (+60 additions, -82 deletions)
View changed files
📝
src/main.rs(+60 -82)📄 Description
Hey! This project looked really cool and I was looking for a way to practice some Rust. So, I went ahead and refactored
main.rsto be more idiomatic. If this isn't the style you're going for, no big deal. I just wanted some practice. :)Overview of Changes
main()now returns aanyhow::Result. This lets us use?for some better semantics.unwraps and allpanics have been removed in favor of returning anErrif letandlet elsestatements are used to improve readability and reduce nesting where possible. (Also, got rid of someunwraps where we knew theOptionhad a value.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.