Skip to content

Commit 2e06a00

Browse files
committed
fix unread-fields warnings on latest nightly (#1330)
It's interesting to note that one of these warnings constitute reading the fields, but these come about by displaying a debug version of these fields, which now doesn't qualify anymore.
1 parent 18b2921 commit 2e06a00

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

gitoxide-core/src/repository/attributes/validate_baseline.rs

+7
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,18 @@ pub(crate) mod function {
262262
}
263263

264264
#[derive(Debug)]
265+
// See note on `Mismatch`
266+
#[allow(dead_code)]
265267
pub struct ExcludeLocation {
266268
pub line: usize,
267269
pub rela_source_file: String,
268270
pub pattern: String,
269271
}
270272

271273
#[derive(Debug)]
274+
// We debug-print this structure, which makes all fields 'used', but it doesn't count.
275+
// TODO: find a way to not have to do more work, but make the warning go away.
276+
#[allow(dead_code)]
272277
pub enum Mismatch {
273278
Attributes {
274279
actual: Vec<gix::attrs::Assignment>,
@@ -281,6 +286,8 @@ pub(crate) mod function {
281286
}
282287

283288
#[derive(Debug)]
289+
// See note on `Mismatch`
290+
#[allow(dead_code)]
284291
pub struct ExcludeMatch {
285292
pub pattern: gix::glob::Pattern,
286293
pub source: Option<PathBuf>,

gix-index/src/extension/fs_monitor.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::{
66
};
77

88
#[derive(Clone)]
9+
#[allow(dead_code)]
910
pub enum Token {
1011
V1 { nanos_since_1970: u64 },
1112
V2 { token: BString },

0 commit comments

Comments
 (0)