forked from agama-project/agama
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rust): adapt to zbus 5 (agama-project#1716)
## The main goal Although [zbus 5](https://github.com/dbus2/zbus/releases/tag/zbus-5.0.0) 5 was released a few days ago, Agama is still using zbus 3. The goal of this PR is to adapt the code to use the latest version. However, this task is not trivial: version 4 already introduced a good share of breaking changes in zbus API. ## `downcast_ref` returns `Result` The `downcast_ref` function now returns a `Result` instead of an `Option` with, IMHO, it is the right thing to do. This change has a big impact in our code to interact with NetworkManager, so I took the opportunity to: * Distinguish between a problem and a missing value (we always returned `None` when something went wrong). * Use `get_property` and `get_optional_property` to simplify our code a bit. ## Other changes - Do some refactoring and organization of D-Bus proxies. - Improve the `network::nm::dbus` module. Let's use `get_property` and `get_optional_property` for better readability and error handling. Please, check [this commit (WIP)](agama-project@c21eda8) if you are interested in further improvements. - Drop some unused code.
- Loading branch information
Showing
68 changed files
with
2,583 additions
and
1,869 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.