@@ -416,16 +416,10 @@ impl Component for EditorView {
416416 }
417417
418418 fn render(&self, mut area: Rect, surface: &mut Surface, cx: &mut Context) {
419− // SAFETY: we cheat around the view_mut() borrow because it doesn't allow us to also borrow
420− // theme. Theme is immutable mutating view won't disrupt theme_ref.
421− let theme_ref = unsafe { &*(&cx.editor.theme as *const Theme) };
422−
423419 for (view, is_focused) in cx.editor.tree.views() {
424420 // TODO: use parent area
425− self.render_view(view, view.area, surface, theme_ref, is_focused);
421+ self.render_view(view, view.area, surface, &cx.editor.theme, is_focused);
426422 }
427−
428− // TODO: drop unwrap
429423 }
430424
431425 fn cursor_position(&self, area: Rect, editor: &Editor) -> Option<Position> {