Skip to content

Commit

Permalink
chore: add some clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dancixx committed May 19, 2024
1 parent 6540757 commit 74c13d0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
2 changes: 0 additions & 2 deletions src/databases/pgsql/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ impl<'a> Pgsql<'a> {
sql,
query_time
)),
execution_time: Some(query_time),
query: Some(sql.to_string()),
})
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/databases/pgsql/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::databases::pgsql::driver::Pgsql;
pub fn Table(table: (String, String), schema: String) -> impl IntoView {
let pgsql = expect_context::<Pgsql>();
let query = create_action(move |(schema, table, pgsql): &(String, String, Pgsql)| {
let pgsql = pgsql.clone();
let pgsql = *pgsql;
let schema = schema.clone();
let table = table.clone();

Expand Down
10 changes: 1 addition & 9 deletions src/store/atoms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,14 @@ use leptos::RwSignal;
pub struct QueryPerformanceAtom {
pub id: usize,
pub message: Option<String>,
pub execution_time: Option<f32>,
pub query: Option<String>,
}

pub type QueryPerformanceContext = RwSignal<VecDeque<QueryPerformanceAtom>>;

#[derive(Debug, Clone)]
#[derive(Debug, Default, Clone)]
pub struct RunQueryAtom {
pub is_running: bool,
}

impl default::Default for RunQueryAtom {
fn default() -> Self {
Self { is_running: false }
}
}

pub type RunQueryContext = RwSignal<RunQueryAtom>;

2 changes: 0 additions & 2 deletions src/store/tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub struct TabsStore {
pub editors: RwSignal<Vec<ModelCell>>,
#[allow(clippy::type_complexity)]
pub sql_results: RwSignal<Vec<(Vec<String>, Vec<Vec<String>>)>>,
pub is_loading: RwSignal<bool>,
}

unsafe impl Send for TabsStore {}
Expand All @@ -46,7 +45,6 @@ impl TabsStore {
active_tabs: create_rw_signal(1),
editors: create_rw_signal(Vec::new()),
sql_results: create_rw_signal(Vec::new()),
is_loading: create_rw_signal(false),
}
}

Expand Down

0 comments on commit 74c13d0

Please sign in to comment.