Add and fix more lints
This commit is contained in:
parent
e43b27acfd
commit
cff933b0bf
6 changed files with 19 additions and 20 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
|
@ -1,6 +1,6 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
|
|
@ -158,12 +158,6 @@ version = "1.6.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9"
|
||||
|
||||
[[package]]
|
||||
name = "case"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c"
|
||||
|
||||
[[package]]
|
||||
name = "caseless"
|
||||
version = "0.2.1"
|
||||
|
|
@ -287,10 +281,8 @@ dependencies = [
|
|||
"thiserror",
|
||||
"time",
|
||||
"tokio",
|
||||
"tokio-tungstenite",
|
||||
"toss",
|
||||
"tz-rs",
|
||||
"unicode-segmentation",
|
||||
"unicode-width",
|
||||
"vault",
|
||||
]
|
||||
|
|
@ -324,7 +316,6 @@ dependencies = [
|
|||
name = "cove-macro"
|
||||
version = "0.8.3"
|
||||
dependencies = [
|
||||
"case",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
|
|
|
|||
16
Cargo.toml
16
Cargo.toml
|
|
@ -19,12 +19,26 @@ tag = "v0.2.3"
|
|||
|
||||
[workspace.lints]
|
||||
rust.unsafe_code = { level = "forbid", priority = 1 }
|
||||
# Lint groups
|
||||
rust.deprecated_safe = "warn"
|
||||
rust.future_incompatible = "warn"
|
||||
rust.keyword_idents = "warn"
|
||||
rust.rust_2018_idioms = "warn"
|
||||
rust.unused = "warn"
|
||||
rust.noop_method_call = "warn"
|
||||
# Individual lints
|
||||
rust.non_local_definitions = "warn"
|
||||
rust.redundant_imports = "warn"
|
||||
rust.redundant_lifetimes = "warn"
|
||||
rust.single_use_lifetimes = "warn"
|
||||
rust.unit_bindings = "warn"
|
||||
rust.unnameable_types = "warn"
|
||||
rust.unused_crate_dependencies = "warn"
|
||||
rust.unused_import_braces = "warn"
|
||||
rust.unused_lifetimes = "warn"
|
||||
rust.unused_qualifications = "warn"
|
||||
# Clippy
|
||||
clippy.use_self = "warn"
|
||||
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ impl<'a> KeyGroupInfo<'a> {
|
|||
}
|
||||
|
||||
pub struct InputEvent<'a> {
|
||||
event: crossterm::event::Event,
|
||||
event: Event,
|
||||
terminal: &'a mut Terminal,
|
||||
crossterm_lock: Arc<FairMutex<()>>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ version = { workspace = true }
|
|||
edition = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
case = "1.0.0"
|
||||
proc-macro2 = "1.0.83"
|
||||
quote = "1.0.36"
|
||||
syn = "2.0.65"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use quote::quote;
|
|||
use syn::spanned::Spanned;
|
||||
use syn::{Data, DeriveInput};
|
||||
|
||||
use crate::util::{self, bail};
|
||||
use crate::util;
|
||||
|
||||
fn decapitalize(s: &str) -> String {
|
||||
let mut chars = s.chars();
|
||||
|
|
@ -34,7 +34,7 @@ pub fn derive_impl(input: DeriveInput) -> syn::Result<TokenStream> {
|
|||
|
||||
let default = util::serde_default(field)?;
|
||||
let Some(default) = default else {
|
||||
return bail(field_ident.span(), "must have serde default");
|
||||
return util::bail(field_ident.span(), "must have serde default");
|
||||
};
|
||||
let default_value = default.value();
|
||||
|
||||
|
|
|
|||
|
|
@ -25,17 +25,12 @@ rusqlite = { version = "0.31.0", features = ["bundled", "time"] }
|
|||
serde_json = "1.0.117"
|
||||
tokio = { version = "1.37.0", features = ["full"] }
|
||||
tz-rs = "0.6.14"
|
||||
unicode-segmentation = "1.11.0"
|
||||
unicode-width = "0.1.12"
|
||||
|
||||
[dependencies.time]
|
||||
version = "0.3.36"
|
||||
features = ["macros", "formatting", "parsing", "serde"]
|
||||
|
||||
[dependencies.tokio-tungstenite]
|
||||
version = "0.21.0"
|
||||
features = ["rustls-tls-native-roots"]
|
||||
|
||||
[dependencies.euphoxide]
|
||||
git = "https://github.com/Garmelon/euphoxide.git"
|
||||
tag = "v0.5.1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue