Address a number of clippy complaints

This commit is contained in:
2020-05-16 14:51:41 +01:00
parent 33d522779a
commit 640948241a
4 changed files with 20 additions and 20 deletions

View File

@@ -15,6 +15,10 @@ impl AsRef<dyn telepathy::ConnectionInterfaceRequests + 'static> for std::rc::Rc
}
}
type ChannelSpec = (dbus::Path<'static>, HashMap<String, VarArg>);
type RequestableChannelSpec = (HashMap<String, VarArg>, Vec<String>);
impl telepathy::ConnectionInterfaceRequests for Connection {
fn create_channel(
&self,
@@ -33,14 +37,12 @@ impl telepathy::ConnectionInterfaceRequests for Connection {
Err(MethodErr::no_arg()) // FIXME: should be NotImplemented?
}
fn channels(&self) -> Result<Vec<(dbus::Path<'static>, HashMap<String, VarArg>)>, MethodErr> {
fn channels(&self) -> Result<Vec<ChannelSpec>, MethodErr> {
println!("Connection<{}>::channels()", self.id);
Ok(vec![])
}
fn requestable_channel_classes(
&self,
) -> Result<Vec<(HashMap<String, VarArg>, Vec<String>)>, MethodErr> {
fn requestable_channel_classes(&self) -> Result<Vec<RequestableChannelSpec>, MethodErr> {
println!("Connection<{}>::requestable_channel_classes()", self.id);
Ok(crate::padfoot::requestables())
}