Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: address cargo check warnings and apply cargo fmt #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RogueOneEcho
Copy link

Quick PR with minor refactors to address cargo warnings and formatting

Before:

$ cargo check
warning: unused variable: `total_tracks`
  --> src/tags/util.rs:62:24
   |
62 |     let (track_number, total_tracks) = tag.track();
   |                        ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_total_tracks`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: constant `WINDOWS_USERPROFILE_ENV` is never used
  --> src/config/constants.rs:11:11
   |
11 | pub const WINDOWS_USERPROFILE_ENV: &str = "USERPROFILE";
   |           ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: constant `WINDOWS_HOMEDRIVE_ENV` is never used
  --> src/config/constants.rs:12:11
   |
12 | pub const WINDOWS_HOMEDRIVE_ENV: &str = "HOMEDRIVE";
   |           ^^^^^^^^^^^^^^^^^^^^^

warning: constant `WINDOWS_HOMEPATH_ENV` is never used
  --> src/config/constants.rs:13:11
   |
13 | pub const WINDOWS_HOMEPATH_ENV: &str = "HOMEPATH";
   |           ^^^^^^^^^^^^^^^^^^^^

warning: function `count_files_with_extension` is never used
  --> src/fs/util.rs:32:14
   |
32 | pub async fn count_files_with_extension(
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method `get_torrent_info` is never used
  --> src/redacted/api/client.rs:52:18
   |
26 | impl RedactedApi {
   | ---------------- method in this implementation
...
52 |     pub async fn get_torrent_info(
   |                  ^^^^^^^^^^^^^^^^

warning: `red_oxide` (bin "red_oxide") generated 6 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s

After:

$ cargo check
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s

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.

None yet

1 participant