Skip to content

Commit e919590

Browse files
Merge pull request #119 from mhansen/clippy
Fix clippy warning about unnecessary Default
2 parents 08fade5 + bffb6f3 commit e919590

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/unzip/seekable_http_reader.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,17 @@ const DEFAULT_SKIP_AHEAD_THRESHOLD: u64 = 2 * 1024 * 1024; // 2MB
4242

4343
/// A hint to the [`SeekableHttpReaderEngine`] about the expected access pattern.
4444
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
45+
#[derive(Default)]
4546
pub(crate) enum AccessPattern {
4647
/// We expect accesses all over the file.
48+
#[default]
4749
RandomAccess,
4850
/// We expect accesses starting from the beginning and moving to the end,
4951
/// though there might be some jumping around if multiple threads are
5052
/// reading from roughly the same area of the file.
5153
SequentialIsh,
5254
}
5355

54-
impl Default for AccessPattern {
55-
fn default() -> Self {
56-
Self::RandomAccess
57-
}
58-
}
5956

6057
/// Errors that may be returned by a [`SeekableHttpReaderEngine` or `SeekableHttpReader`].
6158
#[derive(Error, Debug)]

0 commit comments

Comments
 (0)