Don't warn about unused struct fields in the IPC interface

timeout_old
Tassilo Horn 4 years ago
parent 84822ec645
commit c060d05a23
  1. 3
      src/lib.rs
  2. 7
      src/main.rs

@ -10,6 +10,7 @@ pub type Dim = u16;
pub type Pid = u16; pub type Pid = u16;
#[derive(Deserialize)] #[derive(Deserialize)]
#[allow(dead_code)]
pub struct Rect { pub struct Rect {
x: Dim, x: Dim,
y: Dim, y: Dim,
@ -78,6 +79,7 @@ pub enum ShellType {
} }
#[derive(Deserialize)] #[derive(Deserialize)]
#[allow(dead_code)]
pub struct Node { pub struct Node {
id: Id, id: Id,
name: Option<String>, name: Option<String>,
@ -162,6 +164,7 @@ pub fn get_tree() -> Node {
} }
} }
#[allow(dead_code)]
pub struct Con<'a> { pub struct Con<'a> {
name: &'a str, name: &'a str,
id: Id, id: Id,

@ -1,12 +1,7 @@
use std::fs;
use std::io;
use swayr::Node;
fn main() { fn main() {
let root_node = swayr::get_tree(); let root_node = swayr::get_tree();
for con in swayr::get_cons(&root_node) { for con in swayr::get_cons(&root_node) {
println!("{}\n", con); println!("{}", con);
} }
println!("Yes!") println!("Yes!")
} }

Loading…
Cancel
Save