From 40ec0eeee3bcbfad7d16c93e4572b248c4f0dbdd Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Sun, 13 Jun 2021 22:17:59 +0200 Subject: lint mumlib --- mumlib/src/lib.rs | 15 +++++++++++++++ mumlib/src/state.rs | 2 ++ 2 files changed, 17 insertions(+) (limited to 'mumlib/src') diff --git a/mumlib/src/lib.rs b/mumlib/src/lib.rs index 9b7d686..95ae274 100644 --- a/mumlib/src/lib.rs +++ b/mumlib/src/lib.rs @@ -1,3 +1,18 @@ +#![warn(elided_lifetimes_in_paths)] +#![warn(meta_variable_misuse)] +#![warn(missing_debug_implementations)] +#![warn(single_use_lifetimes)] +#![warn(unreachable_pub)] +#![warn(unused_crate_dependencies)] +#![warn(unused_import_braces)] +#![warn(unused_lifetimes)] +#![warn(unused_qualifications)] +#![deny(macro_use_extern_crate)] +#![deny(missing_abi)] +#![deny(future_incompatible)] +#![forbid(unsafe_code)] +#![forbid(non_ascii_idents)] + pub mod command; pub mod config; pub mod error; diff --git a/mumlib/src/state.rs b/mumlib/src/state.rs index 6fad332..5385380 100644 --- a/mumlib/src/state.rs +++ b/mumlib/src/state.rs @@ -46,6 +46,7 @@ impl Channel { } } +#[derive(Debug)] pub struct Iter<'a> { me: Option<&'a Channel>, channel: Option, @@ -76,6 +77,7 @@ impl<'a> Iterator for Iter<'a> { } } +#[derive(Debug)] pub struct UsersIter<'a> { channel: Option, channels: Vec>, -- cgit v1.2.1 From f24f23faa240053b7ac8f65b69ff8d1ae0ad3ea1 Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Mon, 14 Jun 2021 13:44:08 +0200 Subject: clippy --- mumlib/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mumlib/src') diff --git a/mumlib/src/config.rs b/mumlib/src/config.rs index 3edef37..9b74bfe 100644 --- a/mumlib/src/config.rs +++ b/mumlib/src/config.rs @@ -155,7 +155,7 @@ pub fn read_cfg(path: &Path) -> Result { } else { error!("Error reading config file: {}", e); } - return Ok(Config::default()); + Ok(Config::default()) } } } -- cgit v1.2.1