mirror of
https://git.proxmox.com/git/proxmox
synced 2025-07-27 08:26:39 +00:00
more clippy fixes and annotations
the remaining ones are: - type complexity - fns with many arguments - new() without default() - false positives for redundant closures (where closure returns a static value) - expected vs actual length check without match/cmp Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
1647fc93ff
commit
74092debc5
@ -1190,7 +1190,7 @@ pub struct TypeCounts {
|
||||
},
|
||||
},
|
||||
)]
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
#[derive(Clone, Default, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
/// Garbage collection status.
|
||||
pub struct GarbageCollectionStatus {
|
||||
@ -1217,24 +1217,6 @@ pub struct GarbageCollectionStatus {
|
||||
pub still_bad: usize,
|
||||
}
|
||||
|
||||
impl Default for GarbageCollectionStatus {
|
||||
fn default() -> Self {
|
||||
GarbageCollectionStatus {
|
||||
upid: None,
|
||||
index_file_count: 0,
|
||||
index_data_bytes: 0,
|
||||
disk_bytes: 0,
|
||||
disk_chunks: 0,
|
||||
removed_bytes: 0,
|
||||
removed_chunks: 0,
|
||||
pending_bytes: 0,
|
||||
pending_chunks: 0,
|
||||
removed_bad: 0,
|
||||
still_bad: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[api(
|
||||
properties: {
|
||||
"gc-status": {
|
||||
|
Loading…
Reference in New Issue
Block a user