Brought to my attention by #252, several `unwrap`s exist on code whose failure does not justify the termination of the program, so I took some time to replace them with proper error handling. The request for TARGETS in `handle_selection_request` used `unwrap`. Since the code for a failure of responsing to `SelectionRequest` exists, it simply uses that. `handle_target_list` now early returns if receiving the `GetProperty` request fails. `handle_new_owner` does not update the timestamp for the last selection on failure. `set_owner` now returns a `bool` to indicate whether the `SetSelectionOwner` and `GetSelectionOwner` requests succeeded and whether they transferred ownership successfully or not. The call spots have also been modified to not change the `selection_state` if this call fails. |
||
|---|---|---|
| .. | ||
| server | ||
| xstate | ||
| lib.rs | ||
| main.rs | ||