Skip to content

Commit

Permalink
sec1: Array conversions should not fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Jun 24, 2024
1 parent 5c1c339 commit 28ddab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sec1/src/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ where
}

let (x_bytes, y_bytes) = self.bytes[1..].split_at(Size::to_usize());
let x = Array::from_slice(x_bytes);
let x = Array::try_from(x_bytes).expect("size invariants were violated");

if self.is_compressed() {
Coordinates::Compressed {
Expand All @@ -222,7 +222,7 @@ where
} else {
Coordinates::Uncompressed {
x,
y: Array::from_slice(y_bytes),
y: Array::try_from(y_bytes).expect("size invariants were violated"),
}
}
}
Expand Down

0 comments on commit 28ddab1

Please sign in to comment.