[Q&A] My code snippet to get the state doesn't work #928
-
Hi, I'm making a workspace visualiser (it's not called that) in Rust. // komorebi-client = { git = "https://github.com/LGUG2Z/komorebi", tag = "v0.1.28" }
// serde = "1.0.204"
// serde_json = "1.0.121"
use komorebi_client::{send_query, SocketMessage, State};
fn main() {
let str_state = &send_query(&SocketMessage::State).unwrap();
let _: State = serde_json::from_str(str_state).unwrap();
} The code snippet doesn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The version of This commit is part of the |
Beta Was this translation helpful? Give feedback.
The version of
komorebi
you're running locally needs to match the version of the client that you import as a dependency.This commit is part of the
v0.1.28
release, so it looks like you might be running komorebiv0.1.27
or earlier. You can double check this withkomorebi --version
. If you need to stick to an earlier version for any reason you can also downgrade the tag version inCargo.toml
.