I'm new to rust and figured refactoring an existing project would be a useful exercise to learn the language - as such I'd recommend a thorough review as there may obvious things I've missed or am not aware of.
As it's a significant revision I'd recommend reviewing it commit-by-commit as each is a discrete refactoring
Notable changes
Mostly the changes are just extracting logic but these are worth noting in particular:
Notes
This PR follows on from https://github.com/DevYukine/red_oxide/pull/26
I'm new to rust and figured refactoring an existing project would be a useful exercise to learn the language - as such I'd recommend a thorough review as there may obvious things I've missed or am not aware of.
As it's a significant revision I'd recommend reviewing it commit-by-commit as each is a discrete refactoring
Notable changes
Mostly the changes are just extracting logic but these are worth noting in particular:
Previous behaviour skipped if there was no existing FLAC release, but this change ensure the specified torrent is FLAC which seemed more logical.
TranscodeCommand
as immutable and passes it by referenceThis avoids partial moves without resorting to cloning and seems to be the more rust-like way of doing things
Testing
For the tests to work you will need to add some
.flac
files tosamples/flacs/[TITLE]/[file_name].flac
To get tests running in CI some Open Source / Creative Commons could be downloaded and a mock api response created for them.