提交 45daf83d authored 作者: Serhij S's avatar Serhij S

clippy fmt

上级 ee91e281
......@@ -40,8 +40,7 @@ jobs:
-A clippy::missing_errors_doc \
-A clippy::single_match \
-A clippy::uninlined_format_args \
-A clippy::no_effect_underscore_binding \
-A clippy::large_futures
-A clippy::no_effect_underscore_binding
derive-test:
runs-on: ubuntu-latest
steps:
......@@ -69,8 +68,7 @@ jobs:
-A clippy::missing_errors_doc \
-A clippy::single_match \
-A clippy::uninlined_format_args \
-A clippy::no_effect_underscore_binding \
-A clippy::large_futures
-A clippy::no_effect_underscore_binding
cli-test:
runs-on: ubuntu-latest
steps:
......@@ -98,5 +96,4 @@ jobs:
-A clippy::missing_errors_doc \
-A clippy::single_match \
-A clippy::uninlined_format_args \
-A clippy::no_effect_underscore_binding \
-A clippy::large_futures
-A clippy::no_effect_underscore_binding
......@@ -360,14 +360,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
url = value
.get("remote")
.and_then(|v| v.get("url"))
.and_then(|v| v.as_str())
.and_then(toml::Value::as_str)
.map(String::from);
}
if key.is_none() {
key = value
.get("remote")
.and_then(|v| v.get("key"))
.and_then(|v| v.as_str())
.and_then(toml::Value::as_str)
.map(String::from);
}
if timeout.is_none() {
......
......@@ -59,7 +59,7 @@ impl<T: DataDeliveryPolicy + Clone> Hub<T> {
pub fn send(&self, message: T) {
macro_rules! send {
($sub: expr, $msg: expr) => {
let _ = $sub.tx.send($msg);
let _r = $sub.tx.send($msg);
};
}
// clones matching subscribers to keep the internal mutex unlocked and avoid deadlocks
......
......@@ -51,7 +51,7 @@ impl<T: DataDeliveryPolicy + Clone> Hub<T> {
pub async fn send(&self, message: T) {
macro_rules! send {
($sub: expr, $msg: expr) => {
let _ = $sub.tx.send($msg).await;
let _r = $sub.tx.send($msg).await;
};
}
// clones matching subscribers to keep the internal mutex unlocked and avoid deadlocks
......
......@@ -172,7 +172,7 @@ impl Builder {
name
)));
}
builder = builder.name(name.to_owned());
builder = builder.name(name.clone());
}
if let Some(stack_size) = self.stack_size {
builder = builder.stack_size(stack_size);
......@@ -327,7 +327,7 @@ impl<T> Task<T> {
/// Applies new real-time params
pub fn apply_rt_params(&mut self, rt_params: RTParams) -> Result<()> {
if let Err(e) = apply_thread_params(self.tid, &rt_params, false) {
let _ = apply_thread_params(self.tid, &self.rt_params, false);
let _r = apply_thread_params(self.tid, &self.rt_params, false);
return Err(e);
}
self.rt_params = rt_params;
......@@ -388,7 +388,7 @@ impl<'scope, T> ScopedTask<'scope, T> {
/// Applies new real-time params
pub fn apply_rt_params(&mut self, rt_params: RTParams) -> Result<()> {
if let Err(e) = apply_thread_params(self.tid, &rt_params, false) {
let _ = apply_thread_params(self.tid, &self.rt_params, false);
let _r = apply_thread_params(self.tid, &self.rt_params, false);
return Err(e);
}
self.rt_params = rt_params;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论