forked from extern/nushell
Clippy fix for Rust 1.63 (#6299)
Take more sensitive lints into account Somewhat ugly in some cases is the replacement of `.get(0)` with `.first()`
This commit is contained in:
committed by
GitHub
parent
08c98967e0
commit
c2f4969d4f
@ -145,15 +145,13 @@ fn alias_db(
|
||||
Vec::new(),
|
||||
)),
|
||||
},
|
||||
s => {
|
||||
return Err(ShellError::GenericError(
|
||||
"Connection doesn't define a query".into(),
|
||||
format!("Expected a connection with query. Got {}", s),
|
||||
Some(call.head),
|
||||
None,
|
||||
Vec::new(),
|
||||
))
|
||||
}
|
||||
s => Err(ShellError::GenericError(
|
||||
"Connection doesn't define a query".into(),
|
||||
format!("Expected a connection with query. Got {}", s),
|
||||
Some(call.head),
|
||||
None,
|
||||
Vec::new(),
|
||||
)),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ use super::db_table::DbTable;
|
||||
// Thank you gobang
|
||||
// https://github.com/TaKO8Ki/gobang/blob/main/database-tree/src/lib.rs
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
pub struct Db {
|
||||
pub name: String,
|
||||
pub tables: Vec<DbTable>,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::db_table::DbTable;
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
pub struct DbSchema {
|
||||
pub name: String,
|
||||
pub tables: Vec<DbTable>,
|
||||
|
@ -1,4 +1,4 @@
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub struct DbTable {
|
||||
pub name: String,
|
||||
pub create_time: Option<chrono::DateTime<chrono::Utc>>,
|
||||
|
@ -11,7 +11,7 @@ pub mod db_row;
|
||||
pub mod db_schema;
|
||||
pub mod db_table;
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
|
||||
pub enum ConnectionDb {
|
||||
Path(PathBuf),
|
||||
}
|
||||
|
Reference in New Issue
Block a user