From c060d05a2320f9efbb1522678975c728863d4425 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Wed, 13 Jan 2021 16:48:41 +0100 Subject: [PATCH] Don't warn about unused struct fields in the IPC interface --- src/lib.rs | 3 +++ src/main.rs | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d9d273b..f477dd4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,7 @@ pub type Dim = u16; pub type Pid = u16; #[derive(Deserialize)] +#[allow(dead_code)] pub struct Rect { x: Dim, y: Dim, @@ -78,6 +79,7 @@ pub enum ShellType { } #[derive(Deserialize)] +#[allow(dead_code)] pub struct Node { id: Id, name: Option, @@ -162,6 +164,7 @@ pub fn get_tree() -> Node { } } +#[allow(dead_code)] pub struct Con<'a> { name: &'a str, id: Id, diff --git a/src/main.rs b/src/main.rs index 865e775..ab1a21e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,12 +1,7 @@ -use std::fs; -use std::io; - -use swayr::Node; - fn main() { let root_node = swayr::get_tree(); for con in swayr::get_cons(&root_node) { - println!("{}\n", con); + println!("{}", con); } println!("Yes!") }