mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-01 05:52:01 +03:00
Remove allow unused from gpui2, vim2 tests and terminal_view2 (#3813)
Release Notes: - N/A
This commit is contained in:
parent
41fb29bc5a
commit
16626592db
@ -1,5 +1,3 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
use anyhow::bail;
|
||||
use serde::de::{self, Deserialize, Deserializer, Visitor};
|
||||
use std::fmt;
|
||||
|
@ -248,14 +248,8 @@ impl TerminalElement {
|
||||
{
|
||||
let cell_text = cell.c.to_string();
|
||||
if !is_blank(&cell) {
|
||||
let cell_style = TerminalElement::cell_style(
|
||||
&cell,
|
||||
fg,
|
||||
theme,
|
||||
text_style,
|
||||
text_system,
|
||||
hyperlink,
|
||||
);
|
||||
let cell_style =
|
||||
TerminalElement::cell_style(&cell, fg, theme, text_style, hyperlink);
|
||||
|
||||
let layout_cell = text_system
|
||||
.shape_line(
|
||||
@ -315,7 +309,6 @@ impl TerminalElement {
|
||||
// bg: terminal::alacritty_terminal::ansi::Color,
|
||||
colors: &Theme,
|
||||
text_style: &TextStyle,
|
||||
text_system: &TextSystem,
|
||||
hyperlink: Option<(HighlightStyle, &RangeInclusive<AlacPoint>)>,
|
||||
) -> TextRun {
|
||||
let flags = indexed.cell.flags;
|
||||
@ -392,7 +385,6 @@ impl TerminalElement {
|
||||
let font_size =
|
||||
font_size.map_or(buffer_font_size, |size| theme::adjusted_font_size(size, cx));
|
||||
|
||||
let settings = ThemeSettings::get_global(cx);
|
||||
let theme = cx.theme().clone();
|
||||
|
||||
let link_style = HighlightStyle {
|
||||
@ -898,7 +890,7 @@ impl PlatformInputHandler for TerminalInputHandler {
|
||||
None
|
||||
}
|
||||
|
||||
fn text_for_range(&mut self, range_utf16: std::ops::Range<usize>) -> Option<String> {
|
||||
fn text_for_range(&mut self, _: std::ops::Range<usize>) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
#![allow(unused_variables)]
|
||||
//todo!(remove)
|
||||
|
||||
mod persistence;
|
||||
pub mod terminal_element;
|
||||
pub mod terminal_panel;
|
||||
@ -68,11 +65,9 @@ pub fn init(cx: &mut AppContext) {
|
||||
|
||||
register_deserializable_item::<TerminalView>(cx);
|
||||
|
||||
cx.observe_new_views(
|
||||
|workspace: &mut Workspace, cx: &mut ViewContext<Workspace>| {
|
||||
workspace.register_action(TerminalView::deploy);
|
||||
},
|
||||
)
|
||||
cx.observe_new_views(|workspace: &mut Workspace, _| {
|
||||
workspace.register_action(TerminalView::deploy);
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
|
||||
@ -141,7 +136,6 @@ impl TerminalView {
|
||||
workspace_id: WorkspaceId,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) -> Self {
|
||||
let view_id = cx.entity_id();
|
||||
cx.observe(&terminal, |_, _, cx| cx.notify()).detach();
|
||||
cx.subscribe(&terminal, move |this, _, event, cx| match event {
|
||||
Event::Wakeup => {
|
||||
@ -308,7 +302,7 @@ impl TerminalView {
|
||||
position: gpui::Point<Pixels>,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
let context_menu = ContextMenu::build(cx, |menu, cx| {
|
||||
let context_menu = ContextMenu::build(cx, |menu, _| {
|
||||
menu.action("Clear", Box::new(Clear))
|
||||
.action("Close", Box::new(CloseActiveItem { save_intent: None }))
|
||||
});
|
||||
@ -628,7 +622,6 @@ impl Render for TerminalView {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
let terminal_handle = self.terminal.clone();
|
||||
|
||||
let self_id = cx.entity_id();
|
||||
let focused = self.focus_handle.is_focused(cx);
|
||||
|
||||
div()
|
||||
|
@ -1,6 +1,3 @@
|
||||
#![allow(unused)]
|
||||
// todo!()
|
||||
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use crate::state::Mode;
|
||||
|
@ -1,8 +1,5 @@
|
||||
#![allow(unused)]
|
||||
// todo!()
|
||||
|
||||
use editor::{scroll::VERTICAL_SCROLL_MARGIN, test::editor_test_context::ContextHandle};
|
||||
use gpui::{point, px, rems, size, Context};
|
||||
use gpui::{px, size, Context};
|
||||
use indoc::indoc;
|
||||
use settings::SettingsStore;
|
||||
use std::{
|
||||
|
@ -1,6 +1,3 @@
|
||||
#![allow(unused)]
|
||||
// todo!()
|
||||
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use editor::test::{
|
||||
|
Loading…
Reference in New Issue
Block a user