diff --git a/src/conda.rs b/src/conda.rs index fd27b49..f09268d 100644 --- a/src/conda.rs +++ b/src/conda.rs @@ -36,10 +36,7 @@ fn parse_index(repo: &str, data: &[u8]) -> Result> { last_modified: None, checksum_method: value.get("sha256").map(|_| "sha256".to_string()), checksum: value.get("sha256").map(|x| x.as_str().unwrap().to_owned()), - flags: SnapshotMetaFlag { - force: true, - force_last: true, - }, + ..Default::default() }; if let Some(JsonValue::Object(map)) = v.get("packages") { diff --git a/src/metadata.rs b/src/metadata.rs index dc31bed..ce57133 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -24,6 +24,10 @@ impl SnapshotMeta { pub fn force(key: String) -> Self { Self { key, + flags: SnapshotMetaFlag { + force: true, + force_last: true, + }, ..Default::default() } }