Skip to content

Commit

Permalink
more compact
Browse files Browse the repository at this point in the history
  • Loading branch information
fredr committed Jan 22, 2025
1 parent c0d6f15 commit ac5656a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions runtimes/core/src/api/schema/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,15 +405,11 @@ pub fn handshake_encoding(
let rpc_path = rpc.path.as_ref().unwrap_or(&default_path);

let Some(handshake_schema) = &rpc.handshake_schema else {
let parse_data = rpc
.path
.as_ref()
.map(|path| {
path.segments
.iter()
.any(|segment| segment.r#type() != SegmentType::Literal)
})
.unwrap_or(false);
let parse_data = rpc.path.as_ref().is_some_and(|path| {
path.segments
.iter()
.any(|segment| segment.r#type() != SegmentType::Literal)
});

return Ok(Some(HandshakeSchemaUnderConstruction {
parse_data,
Expand Down

0 comments on commit ac5656a

Please sign in to comment.