Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions core/src/avm1/globals/color_matrix_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
14 changes: 2 additions & 12 deletions desktop/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading