Fix example in client chapter of the book
There is a missing ?
in one of the book examples.
As you can see in the cargo expand
output new
returns a result. Therefore we need to add a ?
after the NotificationsProxy::new
in this example block.
impl<'c> NotificationsProxy<'c> {
#[doc = r" Creates a new proxy with the default service & path."]
pub fn new(conn: &::zbus::Connection) -> ::zbus::Result<Self> {
Ok(Self(::zbus::Proxy::new(
conn,
"org.freedesktop.Notifications",
"/org/freedesktop/Notifications",
"org.freedesktop.Notifications",
)?))
}
Tested with zbus = "2.0.0-beta.3"
and zvariant = "2.6.0"
.