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 {
23
23
24
24
use gio:: prelude:: * ;
25
25
use gio:: subclass:: prelude:: * ;
26
- use gio:: { DBusConnection , IOErrorEnum } ;
26
+ use gio:: { DBusConnection , DBusError } ;
27
27
28
28
const EXAMPLE_XML : & str = r#"
29
29
<node>
@@ -71,10 +71,10 @@ mod imp {
71
71
"Hello" => Ok ( params. get :: < Hello > ( ) . map ( Self :: Hello ) ) ,
72
72
"SlowHello" => Ok ( params. get :: < SlowHello > ( ) . map ( Self :: SlowHello ) ) ,
73
73
"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" ) ) ,
75
75
}
76
76
. 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" ) )
78
78
} )
79
79
}
80
80
}
You can’t perform that action at this time.
0 commit comments