diff --git a/core/src/avm1/globals/color_matrix_filter.rs b/core/src/avm1/globals/color_matrix_filter.rs index e977d9664af1..7eb8e4c14724 100644 --- a/core/src/avm1/globals/color_matrix_filter.rs +++ b/core/src/avm1/globals/color_matrix_filter.rs @@ -61,10 +61,9 @@ impl<'gc> ColorMatrixFilter<'gc> { } fn matrix(self, activation: &mut Activation<'_, 'gc>) -> Value<'gc> { - // Use `.as_slice_of_cells()` to avoid a copy out of the `Cell`. - // FIXME: use `.as_array_of_cells()` once stabilized. - let matrix: &Cell<[f32]> = &self.0.matrix; - let matrix = matrix.as_slice_of_cells(); + // Use `.as_array_of_cells()` to avoid a copy out of the `Cell`. + let matrix = self.0.matrix.as_array_of_cells(); + ArrayBuilder::new(activation) .with(matrix.iter().map(|v| v.get().into())) .into() diff --git a/desktop/src/main.rs b/desktop/src/main.rs index 385c2f1e711c..814db540c84d 100644 --- a/desktop/src/main.rs +++ b/desktop/src/main.rs @@ -81,18 +81,8 @@ fn panic_hook(info: &PanicHookInfo) { } }); - // [NA] Let me just point out that PanicInfo::message() exists but isn't stable and that sucks. - let panic_text = info.to_string(); - let message = if let Some(text) = panic_text.strip_prefix("panicked at '") { - let location = info.location().map(|l| l.to_string()).unwrap_or_default(); - if let Some(text) = text.strip_suffix(&format!("', {location}")) { - text.trim() - } else { - text.trim() - } - } else { - panic_text.trim() - }; + let message = info.payload_as_str().unwrap_or("panic occurred"); + if rfd::MessageDialog::new() .set_level(rfd::MessageLevel::Error) .set_title("Ruffle")