From 71707fec096056767b94b02e95c5dba706d74d7a Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Tue, 12 Apr 2022 18:58:25 -0500 Subject: [PATCH] pass cargo check --- packages/tui/src/hooks.rs | 2 -- packages/tui/src/lib.rs | 3 +-- packages/tui/src/render.rs | 3 +-- packages/tui/src/style_attributes.rs | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/tui/src/hooks.rs b/packages/tui/src/hooks.rs index 434e9e7c5..c09eed50b 100644 --- a/packages/tui/src/hooks.rs +++ b/packages/tui/src/hooks.rs @@ -14,8 +14,6 @@ use std::{ }; use stretch2::{prelude::Layout, Stretch}; -use crate::layout::StretchLayout; -use crate::style_attributes::StyleModifier; use crate::{Dom, Node}; // a wrapper around the input state for easier access diff --git a/packages/tui/src/lib.rs b/packages/tui/src/lib.rs index 1286eba06..872356efb 100644 --- a/packages/tui/src/lib.rs +++ b/packages/tui/src/lib.rs @@ -30,7 +30,6 @@ mod widget; pub use config::*; pub use hooks::*; -pub use render::*; type Dom = RealDom; type Node = dioxus_native_core::real_dom::Node; @@ -111,7 +110,7 @@ fn render_vdom( handler: RinkInputHandler, cfg: Config, mut rdom: Dom, - mut stretch: Rc>, + stretch: Rc>, mut register_event: impl FnMut(crossterm::event::Event), ) -> Result<()> { tokio::runtime::Builder::new_current_thread() diff --git a/packages/tui/src/render.rs b/packages/tui/src/render.rs index 8cee7c55c..e3f03f0d8 100644 --- a/packages/tui/src/render.rs +++ b/packages/tui/src/render.rs @@ -1,4 +1,3 @@ -use crate::layout::StretchLayout; use dioxus_native_core::layout_attributes::UnitSystem; use std::io::Stdout; use stretch2::{ @@ -12,7 +11,7 @@ use crate::{ style::{RinkColor, RinkStyle}, style_attributes::{BorderEdge, BorderStyle}, widget::{RinkBuffer, RinkCell, RinkWidget, WidgetWithContext}, - Config, Dom, Node, StyleModifier, + Config, Dom, Node, }; const RADIUS_MULTIPLIER: [f32; 2] = [1.0, 0.5]; diff --git a/packages/tui/src/style_attributes.rs b/packages/tui/src/style_attributes.rs index 5438eb53d..b49707668 100644 --- a/packages/tui/src/style_attributes.rs +++ b/packages/tui/src/style_attributes.rs @@ -29,7 +29,7 @@ - [ ] pub aspect_ratio: Number, */ -use dioxus_core::{Attribute, VNode}; +use dioxus_core::Attribute; use dioxus_native_core::{ layout_attributes::{parse_value, UnitSystem}, state::{AttributeMask, NodeMask, NodeView, ParentDepState}, @@ -49,7 +49,7 @@ impl ParentDepState for StyleModifier { // todo: seperate each attribute into it's own class const NODE_MASK: NodeMask = NodeMask::new(AttributeMask::All, true, true, false); - fn reduce(&mut self, node: NodeView, parent: Option<&Self::DepState>, ctx: &Self::Ctx) -> bool { + fn reduce(&mut self, node: NodeView, parent: Option<&Self::DepState>, _: &Self::Ctx) -> bool { *self = StyleModifier::default(); if parent.is_some() { self.style.fg = None;