Skip to content

make some Rust snippets more idiomatic#563

Open
moritz-gross wants to merge 1 commit intodaisy:mainfrom
moritz-gross:small-rust-refactorings
Open

make some Rust snippets more idiomatic#563
moritz-gross wants to merge 1 commit intodaisy:mainfrom
moritz-gross:small-rust-refactorings

Conversation

@moritz-gross
Copy link
Copy Markdown
Collaborator

@moritz-gross moritz-gross commented Apr 23, 2026

I want to keep practicing Rust some more, so I tried to find spots that could be refactored to use Rust language features a bit better.
not urgent of course, but overall I think it's good to do some housekeeping on the side.

Comment thread src/interface.rs
} else {
return Ok(value);
}
Ok(value)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it isn't needed, but I find adding "return" makes the code more readable to me because it makes the return value more obvious. So I prefer return Ok(value).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants