Add clippy lints and add rustfmt and clippy to CI.
This commit is contained in:
parent
68c446ca64
commit
a52e0da7c1
@ -1 +0,0 @@
|
||||
merge_imports = true
|
@ -1,4 +1,12 @@
|
||||
language: "rust"
|
||||
before_script:
|
||||
- "rustup component add rustfmt"
|
||||
- "rustup component add clippy"
|
||||
script:
|
||||
- "cargo fmt --all -- --check"
|
||||
- "cargo clippy -- -D warnings"
|
||||
- "cargo build --verbose"
|
||||
- "cargo test --verbose"
|
||||
notifications:
|
||||
email: false
|
||||
irc:
|
||||
|
28
src/lib.rs
28
src/lib.rs
@ -8,8 +8,32 @@
|
||||
//! input parameters for requests, and the structure of a successful response.
|
||||
//! Such types can then be used by client code to make requests, and by server code to fulfill
|
||||
//! those requests.
|
||||
#![deny(missing_debug_implementations)]
|
||||
#![deny(missing_docs)]
|
||||
|
||||
#![deny(
|
||||
missing_copy_implementations,
|
||||
missing_debug_implementations,
|
||||
missing_docs,
|
||||
warnings
|
||||
)]
|
||||
#![warn(
|
||||
clippy::empty_line_after_outer_attr,
|
||||
clippy::expl_impl_clone_on_copy,
|
||||
clippy::if_not_else,
|
||||
clippy::items_after_statements,
|
||||
clippy::match_same_arms,
|
||||
clippy::mem_forget,
|
||||
clippy::missing_docs_in_private_items,
|
||||
clippy::multiple_inherent_impl,
|
||||
clippy::mut_mut,
|
||||
clippy::needless_borrow,
|
||||
clippy::needless_continue,
|
||||
clippy::single_match_else,
|
||||
clippy::unicode_not_nfc,
|
||||
clippy::use_self,
|
||||
clippy::used_underscore_binding,
|
||||
clippy::wrong_pub_self_convention,
|
||||
clippy::wrong_self_convention
|
||||
)]
|
||||
|
||||
use std::{convert::TryInto, io};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user