From 3aec30e32abfbb4e2cef7aff1d1436e7e655f175 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Wed, 6 Sep 2023 23:46:14 +0200 Subject: [PATCH] remove unused imports --- nested/src/editors/list/ctx.rs | 3 --- nested/src/editors/product/nav.rs | 1 - nested/src/editors/typeterm/cmd.rs | 2 +- nested/src/editors/typeterm/ctx.rs | 3 --- nested/src/editors/typeterm/mod.rs | 12 ++---------- 5 files changed, 3 insertions(+), 18 deletions(-) diff --git a/nested/src/editors/list/ctx.rs b/nested/src/editors/list/ctx.rs index 875838a..d42f9c2 100644 --- a/nested/src/editors/list/ctx.rs +++ b/nested/src/editors/list/ctx.rs @@ -1,7 +1,4 @@ use { - r3vi::{ - view::{sequence::*} - }, crate::{ type_system::{Context, TypeTerm}, editors::list::{ListEditor, PTYListController, PTYListStyle} diff --git a/nested/src/editors/product/nav.rs b/nested/src/editors/product/nav.rs index d60a8a3..c339c97 100644 --- a/nested/src/editors/product/nav.rs +++ b/nested/src/editors/product/nav.rs @@ -179,7 +179,6 @@ impl TreeNav for ProductEditor { match e.goby(direction) { TreeNavResult::Exit => { // *cur_depth = 1; - drop(e); if direction.y < 0 { if depth <= (1-direction.y) as usize { diff --git a/nested/src/editors/typeterm/cmd.rs b/nested/src/editors/typeterm/cmd.rs index fba57be..f5b9aff 100644 --- a/nested/src/editors/typeterm/cmd.rs +++ b/nested/src/editors/typeterm/cmd.rs @@ -1,6 +1,6 @@ use { r3vi::{ - view::{singleton::*, sequence::*} + view::{singleton::*} }, crate::{ type_system::{ReprTree}, diff --git a/nested/src/editors/typeterm/ctx.rs b/nested/src/editors/typeterm/ctx.rs index 59ebafb..8036e72 100644 --- a/nested/src/editors/typeterm/ctx.rs +++ b/nested/src/editors/typeterm/ctx.rs @@ -1,7 +1,4 @@ use { - r3vi::{ - view::{singleton::*, sequence::*} - }, crate::{ type_system::{Context, TypeTerm, MorphismTypePattern}, terminal::{TerminalStyle, TerminalProjections}, diff --git a/nested/src/editors/typeterm/mod.rs b/nested/src/editors/typeterm/mod.rs index 6e8c086..d018c81 100644 --- a/nested/src/editors/typeterm/mod.rs +++ b/nested/src/editors/typeterm/mod.rs @@ -6,8 +6,7 @@ pub use ctx::init_ctx; use { r3vi::{ - buffer::{singleton::*}, - view::{singleton::*, sequence::*} + buffer::{singleton::*} }, crate::{ type_system::{Context, TypeID, TypeTerm, ReprTree}, @@ -122,17 +121,13 @@ impl TypeTermEditor { editor.set_state( State::Char ); editor.send_cmd_obj(ReprTree::from_char(&ctx, *c)); } - - _ => {} } node.goto(TreeCursor::none()); node } - - fn set_state(&mut self, new_state: State) { - let old_node = self.cur_node.get(); + fn set_state(&mut self, new_state: State) { let mut node = match new_state { State::Any => { Context::make_node( &self.ctx, (&self.ctx, "( List Char )").into(), self.depth ).unwrap() @@ -168,9 +163,6 @@ impl TypeTermEditor { Context::make_node( &self.ctx, (&self.ctx, "( Char )").into(), self.depth ).unwrap() .morph( (&self.ctx, "( Type::Lit::Char )").into() ) } - _ => { - old_node - } }; node.goto(TreeCursor::home());