summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Verevkin <maxxverrr@gmail.com>2022-04-01 21:55:35 +0300
committerMax Verevkin <maxxverrr@gmail.com>2022-04-01 22:00:32 +0300
commit77f69b25ba5f4829e0c6fef692c94a38cc388abe (patch)
treee6d61eba45ad8490510b0ab8e5dd5467037534a7 /src
parent7bcaa341b8685ba411d206c1a89dc3ca77aa71bb (diff)
downloadi3bar-mango-77f69b25ba5f4829e0c6fef692c94a38cc388abe.tar.gz
fix some clippy lints, ignore others
Diffstat (limited to 'src')
-rw-r--r--src/main.rs3
-rw-r--r--src/river_protocols.rs1
-rw-r--r--src/text.rs4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index cc37aa7..0b94c24 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -312,6 +312,7 @@ pub struct Surface {
}
impl Surface {
+ #[allow(clippy::too_many_arguments)]
fn new(
output: &wl_output::WlOutput,
output_id: u32,
@@ -366,7 +367,7 @@ impl Surface {
// Commit so that the server will send a configure event
surface.commit();
- let river_output_status = river_status.get_river_output_status(&output);
+ let river_output_status = river_status.get_river_output_status(output);
let tags_info = Rc::new(RefCell::new(TagsInfo::default()));
let tags_info_handle = Rc::clone(&tags_info);
let blocks_handle = Rc::clone(&blocks);
diff --git a/src/river_protocols.rs b/src/river_protocols.rs
index 0c77823..b7f588d 100644
--- a/src/river_protocols.rs
+++ b/src/river_protocols.rs
@@ -6,6 +6,7 @@ mod generated {
// so we isolate it into a very permissive module
#![allow(dead_code, non_camel_case_types, unused_unsafe, unused_variables)]
#![allow(non_upper_case_globals, non_snake_case, unused_imports)]
+ #![allow(clippy::all)]
pub mod client1 {
// These imports are used by the generated code
diff --git a/src/text.rs b/src/text.rs
index eefbd48..a1d2e48 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -118,12 +118,12 @@ impl ComputedText {
layout.set_height(text_height as i32 * pango::SCALE);
if let Some(bg) = options.bg_color {
- bg.apply(&context);
+ bg.apply(context);
context.rectangle(0.0, 0.0, self.width, options.bar_height);
context.fill().unwrap();
}
- options.fg_color.apply(&context);
+ options.fg_color.apply(context);
context.translate(
text.attr.padding_left,
(options.bar_height - self.height) * 0.5,