Skip to content

Mark ReadDataLineFuture as #[allow(dead_code)] #2108

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

Merged
merged 1 commit into from
Aug 9, 2025

Conversation

EliahKagan
Copy link
Member

The ReadDataLineFuture struct was among the facilities added within gix-packetline in 41fdb84 (#634), and it looks like it may have been intended to be used eventually. However, it is unused.

While it is public in read::sidebands::async_io module, the only facility from that module that is exposed through read::sidebands is WithSidebands:

#[cfg(all(not(feature = "blocking-io"), feature = "async-io"))]
mod async_io;
#[cfg(all(not(feature = "blocking-io"), feature = "async-io"))]
pub use async_io::WithSidebands;

This situation appears to be long-standing. However, possibly because it is public in its own directly containing module, it was not detected as dead code by cargo clippy until recently.

Specifically, this caused the CI lint job to fail starting in the recently released Rust 1.89. This can be observed by rerunning the workflow where it had passed before:

https://github.com/EliahKagan/gitoxide/actions/runs/16739420509/job/47709197815

(The failure only happens in the lean-async run of cargo clippy because the containing module is not used at all in the max, small, and max-pure builds.)

For now, this PR suppresses the error by adding #[allow(dead_code)] to ReadDataLineFuture.


It may be that a different fix is preferable, maybe even removing ReadDataLineFuture altogether. I figured this would be a reasonable fix to start with, because currently this fails the lint job in PRs and feature branches, such as this failure in #2106. The idea here is to unblock progress in other areas, but I don't claim that this should be permanent.

@EliahKagan EliahKagan marked this pull request as ready for review August 9, 2025 00:32
@EliahKagan EliahKagan enabled auto-merge August 9, 2025 00:32
@EliahKagan EliahKagan disabled auto-merge August 9, 2025 00:32
@EliahKagan EliahKagan marked this pull request as draft August 9, 2025 00:33
The `ReadDataLineFuture` struct was among the facilities added
within `gix-packetline` in 41fdb84 (GitoxideLabs#634), and it looks like it may
have been intended to be used eventually. However, it is unused.

While it is public in `read::sidebands::async_io` module, the only
facility from that module that is exposed through `read::sidebands`
is `WithSidebands`:

https://github.com/GitoxideLabs/gitoxide/blob/04a18f3a4520dd6f49b5f87fe3782dd1cd1547f2/gix-packetline/src/read/sidebands/mod.rs#L6-L9

This situation appears to be long-standing. However, possibly
because it is public in its own directly containing module, it was
not detected as dead code by `cargo clippy` until recently.

Specifically, this caused the CI `lint` job to fail starting in the
recently released Rust 1.89. This can be observed by rerunning the
workflow where it had passed before:

https://github.com/EliahKagan/gitoxide/actions/runs/16739420509/job/47709197815

(The failure only happens in the `lean-async` run of `cargo clippy`
because the containing module is not used at all in the `max`,
`small`, and `max-pure` builds.)

For now, this commit suppresses the error by adding
`#[allow(dead_code)]` to `ReadDataLineFuture`.
@EliahKagan EliahKagan marked this pull request as ready for review August 9, 2025 00:57
@EliahKagan EliahKagan enabled auto-merge August 9, 2025 00:57
@EliahKagan EliahKagan merged commit 1dfc312 into GitoxideLabs:main Aug 9, 2025
42 of 45 checks passed
@EliahKagan EliahKagan deleted the rdlf branch August 9, 2025 00:57
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.

1 participant