diff options
Diffstat (limited to 'src/access/envelope.rs')
| -rw-r--r-- | src/access/envelope.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/access/envelope.rs b/src/access/envelope.rs index d592bff..95371d3 100644 --- a/src/access/envelope.rs +++ b/src/access/envelope.rs @@ -39,7 +39,7 @@ pub(crate) fn listed_at() -> Vec<String> { /// The paths `doc` lists as user-signed; an entry that isn't a list of strings is left /// out. -pub(crate) fn listed(doc: &impl Read) -> Vec<Vec<String>> { +pub(crate) fn listed(doc: &(impl Read + ?Sized)) -> Vec<Vec<String>> { let Ok(Some(JsonValue::Array(entries))) = view::read_plain(doc, &listed_at()) else { return Vec::new(); }; @@ -67,7 +67,7 @@ fn deciding() -> Vec<Vec<String>> { /// The paths whose values their users sign under a strict policy: what decides who may /// do what (`deciding`), and those `doc` lists (`listed`). -pub(crate) fn signed_paths(doc: &impl Read) -> Vec<Vec<String>> { +pub(crate) fn signed_paths(doc: &(impl Read + ?Sized)) -> Vec<Vec<String>> { let mut paths = deciding(); paths.extend(listed(doc)); paths @@ -151,7 +151,7 @@ pub(crate) fn read(envelope: &str) -> Result<Payload, String> { /// its swarm, that path, naming what it replaces and numbered after it, signed by one of /// its user's keys, a user who may write there. pub(crate) fn check( - doc: &impl Read, + doc: &(impl Read + ?Sized), envelope: &str, path: &[String], previous: Option<&str>, @@ -207,7 +207,7 @@ pub(crate) fn check( /// with only its keys changed from the one at `path` in `doc`, one left at least: a user /// manages its own keys, whatever else it may do. fn own_keys_only( - doc: &impl Read, + doc: &(impl Read + ?Sized), payload: &Payload, user: ®istry::User, path: &[String], |
