Skip to content

Conversation

@blairconrad
Copy link
Contributor

When git-absorb is built, we're beset by warnings:

warning: field `trailing_newline` is never read
  --> src/owned.rs:54:9
   |
51 | pub struct Block {
   |            ----- field in this struct
...
54 |     pub trailing_newline: bool,
   |         ^^^^^^^^^^^^^^^^
   |
   = note: `Block` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

warning: fields `old_id` and `new_id` are never read
   --> src/owned.rs:209:9
    |
207 | pub struct Patch {
    |            ----- fields in this struct
208 |     pub old_path: Vec<u8>,
209 |     pub old_id: git2::Oid,
    |         ^^^^^^
210 |     pub new_path: Vec<u8>,
211 |     pub new_id: git2::Oid,
    |         ^^^^^^
    |
    = note: `Patch` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

warning: `git-absorb` (lib) generated 2 warnings

Removing a few unused fields quiets them right up.

@tummychow tummychow merged commit 0befc3f into tummychow:master Mar 15, 2025
5 checks passed
@blairconrad blairconrad deleted the quell-warnings branch April 2, 2025 11:02
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