diff options
Diffstat (limited to 'src/access/rules.rs')
| -rw-r--r-- | src/access/rules.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/access/rules.rs b/src/access/rules.rs index 93cef63..d8831ce 100644 --- a/src/access/rules.rs +++ b/src/access/rules.rs @@ -219,7 +219,7 @@ pub(crate) fn judge_reading( /// In a swarm holding a store of some fold, as `holding` judges it there, which is its /// kind of document's to say. pub(crate) fn judge_seen( - at: &impl Read, + at: &(impl Read + ?Sized), epoch: Epoch, unit: &Unit<'_>, read: &mut Seen, @@ -502,7 +502,7 @@ pub(crate) fn judge_held( /// string put there that is one (or deleting what is there); nothing within one; nothing /// in an object nowhere to be found, which might be one. fn sealed_values( - at: &impl Read, + at: &(impl Read + ?Sized), declared: &[super::sealed::Declared], ops: &[Op], ) -> Result<(), String> { @@ -534,7 +534,7 @@ fn sealed_values( /// as a write replacing it does); nothing within one; above one, /// nothing replacing or deleting what holds one (a map made where there is none yet, /// what is inside a list or text, which holds none). -fn signed_values(at: &impl Read, ops: &[Op]) -> Result<(), String> { +fn signed_values(at: &(impl Read + ?Sized), ops: &[Op]) -> Result<(), String> { let signed = super::envelope::signed_paths(at); for op in ops { let path = &op.path; @@ -589,7 +589,7 @@ fn signed_values(at: &impl Read, ops: &[Op]) -> Result<(), String> { /// Whether what is at `path` in `at` holds a value at a place for one its user signs, /// of `signed` (`envelope::signed_paths`), signed or from before the policy; one that /// doesn't read, as if it did. -fn holds_signed(at: &impl Read, path: &[String], signed: &[Vec<String>]) -> bool { +fn holds_signed(at: &(impl Read + ?Sized), path: &[String], signed: &[Vec<String>]) -> bool { fn within(value: &serde_json::Value, place: &mut Vec<String>, signed: &[Vec<String>]) -> bool { if super::envelope::is_signed(signed, place) { return true; @@ -628,7 +628,12 @@ fn shown(path: &Path) -> String { /// Whether remake `id`, coordinated by `node`, made `epoch`: as its snapshot's metadata /// says (`remake::snapshot`), at `at`. Never genesis. -pub(super) fn made_the_epoch(at: &impl Read, epoch: Epoch, id: &str, node: &str) -> bool { +pub(super) fn made_the_epoch( + at: &(impl Read + ?Sized), + epoch: Epoch, + id: &str, + node: &str, +) -> bool { if epoch.generation == 0 { return false; } @@ -647,7 +652,7 @@ pub(super) fn made_the_epoch(at: &impl Read, epoch: Epoch, id: &str, node: &str) } /// The coordinator remake `id`'s proposal names, at `at`. -pub(super) fn coordinator(at: &impl Read, id: &str) -> Option<String> { +pub(super) fn coordinator(at: &(impl Read + ?Sized), id: &str) -> Option<String> { let proposal = view::read_path(at, &meta::path(&[meta::REMAKES, id, "proposal"])) .ok() .flatten()?; |
