From fbf300bf6a97876545ee39a66d70ce61e058a174 Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Fri, 13 Dec 2024 22:16:11 -0500 Subject: [PATCH] clippy --- src/components/array.rs | 2 +- src/components/array_info/chunked.rs | 10 ++++------ src/components/table.rs | 3 +++ src/main.rs | 5 ++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/array.rs b/src/components/array.rs index 839d8d2..823a21c 100644 --- a/src/components/array.rs +++ b/src/components/array.rs @@ -47,7 +47,7 @@ pub fn ArrayView(file_name: String, history_stack: Signal 0 { + if !array.inner.children().is_empty() { ArrayChildren { history_stack } } } diff --git a/src/components/array_info/chunked.rs b/src/components/array_info/chunked.rs index 170e2f5..faee5e2 100644 --- a/src/components/array_info/chunked.rs +++ b/src/components/array_info/chunked.rs @@ -1,6 +1,4 @@ -use dioxus::prelude::*; -use vortex::array::ChunkedArray; - -pub fn ChunkedArrayInfo(chunked_array: ChunkedArray) -> Element { - rsx! {} -} +// #[component] +// pub fn ChunkedArrayInfo(chunked_array: ChunkedArray) -> Element { +// rsx! {} +// } diff --git a/src/components/table.rs b/src/components/table.rs index 3df8ef7..65c00d5 100644 --- a/src/components/table.rs +++ b/src/components/table.rs @@ -1,3 +1,5 @@ +#![allow(unused)] + use dioxus::prelude::*; // TODO(aduffy): Convert all of our tables to types in here instead. @@ -47,6 +49,7 @@ pub struct TableCellProps { } /// Let's create a few of these cell values instead. +#[component] pub fn TableCell(props: TableCellProps) -> Element { let font_family = match props.font_family { FontStyle::Inherit => "", diff --git a/src/main.rs b/src/main.rs index a1e6298..00e5f26 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,6 @@ use std::sync::Arc; use bytes::Bytes; use components::{array::ArrayView, AppHeader, ErrorMessage}; -use dioxus::logger::tracing; use dioxus::prelude::*; use dioxus_elements::FileEngine; use vortex::{ @@ -37,11 +36,11 @@ fn App() -> Element { #[component] fn Home() -> Element { // Create a file reader. - let mut file_name = use_signal(|| String::new()); + let mut file_name = use_signal(String::new); let mut read_error = use_signal::>(|| None); // Push the latest history for each of these elements. - let mut history_stack: Signal> = use_signal(|| VecDeque::new()); + let mut history_stack: Signal> = use_signal(VecDeque::new); let read_files = move |file_engine: Arc| async move { file_name.set(file_engine.files()[0].clone());