hyprland-community / hyprland-rs

An unofficial rust wrapper for hyprland's IPC [maintainers=@yavko,@cyrinux]
Other
252 stars 56 forks source link

don't panic in call_hyprctl_data_cmd_async and call_hyprctl_data_cmd #205

Closed thrombe closed 7 months ago

thrombe commented 7 months ago

fixes #204.

hyprland-rs sometimes panics when device wakes up from sleep. the panic is here.

I quickly patched it to use in a tool that i made. And i figured that i might as well make a PR. let me know if i missed something obviously wrong.

i just made both call_hyprctl_data_cmd and call_hyprctl_data_cmd_async to return a crate::Result. all the places that use these functions are already returning a crate::Result.