Remove unused struct fields from sway JSON objects

Some of these attributes seem to be missing in certain situations, so it's easier to just not parse them at all instead of trying to figure out which of these are optional and when.
master 0.4.0
Benjamin Bädorf 2021-01-20 22:50:44 +01:00
parent 1e7042f195
commit 8625f0f2c9
No known key found for this signature in database
GPG Key ID: 4406E80E13CD656C
1 changed files with 0 additions and 13 deletions

View File

@ -17,7 +17,6 @@ struct SwayScreenRect {
#[derive(Serialize, Deserialize, Clone, Debug)]
struct SwayWorkspace {
id: usize,
name: String,
focus: Vec<usize>,
output: String,
@ -25,9 +24,6 @@ struct SwayWorkspace {
rect: SwayScreenRect,
visible: bool,
num: usize,
#[serde(rename = "type")]
type_name: String,
representation: String,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
@ -39,18 +35,9 @@ struct SwayOutputMode {
#[derive(Serialize, Deserialize, Clone, Debug)]
struct SwayOutput {
id: usize,
name: String,
rect: SwayScreenRect,
layout: String,
orientation: String,
#[serde(rename = "type")]
type_name: String,
make: String,
model: String,
serial: String,
current_mode: SwayOutputMode,
focused: bool,
}
#[derive(Copy, Clone, Hash, Eq, Debug)]