Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sgwilym committed Oct 23, 2024
1 parent 6ea223b commit acf0c65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data-model/src/relative_encodings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,8 +1650,8 @@ pub(super) mod encoding {
path_start.longest_common_prefix(&reference.paths().start);
let lcp_start_end = path_start.longest_common_prefix(ref_path_end);

let expected_is_start_rel_to_start = lcp_start_start.get_component_count()
>= lcp_start_end.get_component_count();
let expected_is_start_rel_to_start =
lcp_start_start.component_count() >= lcp_start_end.component_count();

if expected_is_start_rel_to_start != is_path_start_rel_to_start {
return Err(DecodeError::InvalidInput);
Expand Down Expand Up @@ -1687,8 +1687,8 @@ pub(super) mod encoding {
let lcp_end_start = p_end.longest_common_prefix(&reference.paths().start);
let lcp_end_end = p_end.longest_common_prefix(ref_end);

let expected_is_path_end_rel_to_start = lcp_end_start.get_component_count()
>= lcp_end_end.get_component_count();
let expected_is_path_end_rel_to_start =
lcp_end_start.component_count() >= lcp_end_end.component_count();

if expected_is_path_end_rel_to_start != is_path_end_rel_to_start {
return Err(DecodeError::InvalidInput);
Expand Down

0 comments on commit acf0c65

Please sign in to comment.