.await
.map_err(|e| RpcError::Custom(format!("JSON-RPC command startLink failed: {e:?}")))?
.device_link_uri;
- println!("{}", url);
+ println!("{url}");
client.finish_link(url, name).await
}
CliCommands::ListAccounts => client.list_accounts().await,
self.inner
.send(body)
.await
- .map_err(|e| Errors::Other(format!("{:?}", e)))?;
+ .map_err(|e| Errors::Other(format!("{e:?}")))?;
Ok(())
}
self.inner
.close()
.await
- .map_err(|e| Errors::Other(format!("{:?}", e)))?;
+ .map_err(|e| Errors::Other(format!("{e:?}")))?;
Ok(())
}
}
match self.inner.next().await {
None => Err(Errors::Closed),
Some(Ok(msg)) => Ok(ReceivedMessage::Text(msg)),
- Some(Err(e)) => Err(Errors::Other(format!("{:?}", e))),
+ Some(Err(e)) => Err(Errors::Other(format!("{e:?}"))),
}
}
}
match str::from_utf8(line.as_ref()) {
Ok(s) => Ok(Some(s.to_string())),
- Err(_) => Err(io::Error::new(io::ErrorKind::Other, "invalid UTF-8")),
+ Err(_) => Err(io::Error::other("invalid UTF-8")),
}
} else {
Ok(None)