-
Notifications
You must be signed in to change notification settings - Fork 213
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
fix: Remove dead code detected by the rust beta compiler #2121
Conversation
The beta compiler identifies these as dead code.
iroh-sync/src/ranger.rs
Outdated
// /// Returns true if `other` is a prefix of `self`. | ||
// fn is_prefixed_by(&self, other: &Self) -> bool { | ||
// other.is_prefix_of(self) | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Frando What is the deal with this trait?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, it's used in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Frando I think I've made this happy for the compiler. But could you make sure it does the right thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in iroh-sync
are 👍 - might very well be that these are only used in tests, because outside of tests we never work with the ranger keys and values in a generic way.
@Frando could you, err, approve in that case? |
@@ -216,43 +216,6 @@ impl<W: BaoBatchWriter, F: Fn(u64, usize) -> io::Result<()> + 'static> BaoBatchW | |||
} | |||
} | |||
|
|||
/// A combined batch writer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is dead since we have a proper batch writer. In some branch I removed this already.
Description
The beta compiler identifies these as dead code.
Notes & open questions
Change checklist