Skip to content

Commit 7d6d917

Browse files
committed
Fix nightly dead_code warnings
- Remove unused fields for custom repository - Ignore warnings for deserialized errors. These are actually useful.
1 parent a7a3cdc commit 7d6d917

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/index/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@ pub struct Index {
2020
#[derive(Debug, serde::Deserialize, Clone)]
2121
#[serde(rename_all = "kebab-case")]
2222
struct IndexConfig {
23-
dl: String,
2423
#[serde(default)]
2524
api: Option<Url>,
26-
#[serde(default)]
27-
allowed_registries: Vec<String>,
2825
}
2926

3027
/// Inspects the given repository to find the config as specified in [RFC 2141][], assumes that the

src/repositories/gitlab.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,18 +205,21 @@ struct GraphResponse<T> {
205205
}
206206

207207
#[derive(Debug, Deserialize)]
208+
#[allow(dead_code)] // used by anyhow for error reporting; apparently the compiler isn't smart enough to tell
208209
struct GraphError {
209210
message: String,
210211
locations: Vec<GraphErrorLocation>,
211212
}
212213

213214
#[derive(Debug, Deserialize)]
215+
#[allow(dead_code)]
214216
struct GraphErrorLocation {
215217
line: u32,
216218
column: u32,
217219
}
218220

219221
#[derive(Debug, Deserialize)]
222+
#[allow(dead_code)]
220223
struct GraphRateLimit {
221224
remaining: u32,
222225
}

0 commit comments

Comments
 (0)