Skip to content

Commit 37058d9

Browse files
Shnatselthedataking
authored andcommitted
Refactor infallible conversions to make it more clear
1 parent 921942d commit 37058d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/rust_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,12 @@ impl Picture {
416416

417417
/// Chromaticity coordinates of the source colour primaries.
418418
pub fn color_primaries(&self) -> pixel::ColorPrimaries {
419-
self.inner.seq_hdr.as_ref().unwrap().pri.try_into().unwrap()
419+
self.inner.seq_hdr.as_ref().unwrap().pri.into()
420420
}
421421

422422
/// Transfer characteristics function.
423423
pub fn transfer_characteristic(&self) -> pixel::TransferCharacteristic {
424-
self.inner.seq_hdr.as_ref().unwrap().trc.try_into().unwrap()
424+
self.inner.seq_hdr.as_ref().unwrap().trc.into()
425425
}
426426

427427
/// Matrix coefficients used in deriving luma and chroma signals from the

0 commit comments

Comments
 (0)