Skip to content

Commit 8aaf995

Browse files
SuchAFuriousDeathkjarosh
authored andcommitted
chore: Simplify code using Cell::as_array_of_cells
1 parent 23c87f6 commit 8aaf995

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/src/avm1/globals/color_matrix_filter.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ impl<'gc> ColorMatrixFilter<'gc> {
6161
}
6262

6363
fn matrix(self, activation: &mut Activation<'_, 'gc>) -> Value<'gc> {
64-
// Use `.as_slice_of_cells()` to avoid a copy out of the `Cell`.
65-
// FIXME: use `.as_array_of_cells()` once stabilized.
66-
let matrix: &Cell<[f32]> = &self.0.matrix;
67-
let matrix = matrix.as_slice_of_cells();
64+
// Use `.as_array_of_cells()` to avoid a copy out of the `Cell`.
65+
let matrix = self.0.matrix.as_array_of_cells();
66+
6867
ArrayBuilder::new(activation)
6968
.with(matrix.iter().map(|v| v.get().into()))
7069
.into()

0 commit comments

Comments
 (0)