Skip to content

Commit 2debb5b

Browse files
committed
Resolve API changes affecting image-canvas
1 parent 9b1801c commit 2debb5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

canvas/src/frame.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl Canvas {
272272

273273
let mut offset = 0;
274274
// This frame's layout takes 0 bytes, so we can take all contents with split_layout
275-
let frame: ImageMut<'_, Bytes> = self.as_mut().decay().expect("decay to bytes valid");
275+
let frame: ImageMut<'_, Bytes> = self.as_mut().decay();
276276

277277
let &Bytes(total_len) = frame.layout();
278278
let mut frame = frame.with_layout(Bytes(0)).expect("zero-byte layout valid");
@@ -444,15 +444,15 @@ impl<'data, C> ChannelsMut<'data, C> {
444444
impl<'data, T> From<PlaneRef<'data, T>> for BytePlaneRef<'data> {
445445
fn from(plane: PlaneRef<'data, T>) -> Self {
446446
BytePlaneRef {
447-
inner: plane.inner.decay().unwrap(),
447+
inner: plane.inner.decay(),
448448
}
449449
}
450450
}
451451

452452
impl<'data, T> From<PlaneMut<'data, T>> for BytePlaneMut<'data> {
453453
fn from(plane: PlaneMut<'data, T>) -> Self {
454454
BytePlaneMut {
455-
inner: plane.inner.decay().unwrap(),
455+
inner: plane.inner.decay(),
456456
}
457457
}
458458
}

0 commit comments

Comments
 (0)