Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions biscuit-auth/src/format/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ pub fn proto_block_to_token_block(

detected_schema_version.check_compatibility(version)?;

let scopes: Result<Vec<Scope>, _> =
input.scope.iter().map(proto_scope_to_token_scope).collect();

Copy link
Copy Markdown
Contributor

@divarvel divarvel Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will require removing the ? below, i think, since this definition shadows the previous one.

Ok(Block {
symbols,
facts,
Expand All @@ -125,7 +122,7 @@ pub fn proto_block_to_token_block(
version,
external_key,
public_keys,
scopes: scopes?,
scopes,
})
}

Expand Down Expand Up @@ -192,9 +189,6 @@ pub fn proto_snapshot_block_to_token_block(

detected_schema_version.check_compatibility(version)?;

let scopes: Result<Vec<Scope>, _> =
input.scope.iter().map(proto_scope_to_token_scope).collect();

let external_key = match &input.external_key {
None => None,
Some(key) => Some(PublicKey::from_proto(key)?),
Expand All @@ -209,7 +203,7 @@ pub fn proto_snapshot_block_to_token_block(
version,
external_key,
public_keys: PublicKeys::default(),
scopes: scopes?,
scopes,
})
}
pub fn authorizer_to_proto_authorizer(input: &AuthorizerPolicies) -> schema::AuthorizerPolicies {
Expand Down
Loading