File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
examples/gio_dbus_register_object Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ mod imp {
2323
2424 use gio:: prelude:: * ;
2525 use gio:: subclass:: prelude:: * ;
26- use gio:: { DBusConnection , IOErrorEnum } ;
26+ use gio:: { DBusConnection , DBusError } ;
2727
2828 const EXAMPLE_XML : & str = r#"
2929<node>
@@ -71,10 +71,10 @@ mod imp {
7171 "Hello" => Ok ( params. get :: < Hello > ( ) . map ( Self :: Hello ) ) ,
7272 "SlowHello" => Ok ( params. get :: < SlowHello > ( ) . map ( Self :: SlowHello ) ) ,
7373 "GoodBye" => Ok ( Some ( Self :: GoodBye ) ) ,
74- _ => Err ( glib:: Error :: new ( IOErrorEnum :: Failed , "No such method" ) ) ,
74+ _ => Err ( glib:: Error :: new ( DBusError :: UnknownMethod , "No such method" ) ) ,
7575 }
7676 . and_then ( |p| {
77- p. ok_or_else ( || glib:: Error :: new ( IOErrorEnum :: Failed , "Invalid parameters" ) )
77+ p. ok_or_else ( || glib:: Error :: new ( DBusError :: InvalidArgs , "Invalid parameters" ) )
7878 } )
7979 }
8080 }
You can’t perform that action at this time.
0 commit comments