Skip to content

Commit 0dc5fc0

Browse files
authored
pkc%refac: bls_{chia,ietf}_*.json5 -> bls_*.json5 (#28)
2 parents f6ef072 + b211ccc commit 0dc5fc0

35 files changed

Lines changed: 1387 additions & 1344 deletions

pkgs/dev/src/corpus.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,23 @@ impl Corpus {
132132
Self::parse(name, &text)
133133
}
134134

135+
/// Returns a sub-corpus rooted at `key`, for files that nest their
136+
/// sections under an outer key such as the scheme name.
137+
///
138+
/// # Panics
139+
///
140+
/// Panics if the key is absent from the current root.
141+
pub fn scope(&self, key: &str) -> Self {
142+
let val = self
143+
.root
144+
.get(key)
145+
.unwrap_or_else(|| panic!("{}: missing key '{key}'", self.name));
146+
Self {
147+
name: format!("{}/{key}", self.name),
148+
root: val.clone(),
149+
}
150+
}
151+
135152
/// Returns a named array section as typed vectors: `{ section: [T, ...] }`.
136153
///
137154
/// # Panics

pkgs/pkc/corpus/bls_aggregate.json5

Lines changed: 257 additions & 27 deletions
Large diffs are not rendered by default.

pkgs/pkc/corpus/bls_chia_aggregate.json5

Lines changed: 0 additions & 114 deletions
This file was deleted.

pkgs/pkc/corpus/bls_chia_dh.json5

Lines changed: 0 additions & 14 deletions
This file was deleted.

pkgs/pkc/corpus/bls_chia_keygen.json5

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)