Skip to content

Commit 806fdb7

Browse files
committed
ref: cargo clippy
1 parent 50006f5 commit 806fdb7

4 files changed

Lines changed: 5 additions & 11 deletions

File tree

crates/taurus-core/src/runtime/engine/executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ impl<'a> EngineExecutor<'a> {
734734
}
735735

736736
let mut fields = HashMap::new();
737-
for (parameter, value) in node.parameters.iter().zip(values.into_iter()) {
737+
for (parameter, value) in node.parameters.iter().zip(values) {
738738
fields.insert(parameter.runtime_parameter_id.clone(), value);
739739
}
740740

crates/taurus-core/src/runtime/functions/http.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,9 @@ fn decode_response_payload(response: http::Response<Body>) -> Result<Value, Stri
297297
.as_deref()
298298
.map(content_type_is_json)
299299
.unwrap_or(false)
300-
{
301-
if let Ok(json) = serde_json::from_str::<JsonValue>(&text) {
300+
&& let Ok(json) = serde_json::from_str::<JsonValue>(&text) {
302301
return Ok(from_json_value(json));
303302
}
304-
}
305303

306304
return Ok(text.to_value());
307305
}

crates/taurus-manual/src/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,7 @@ async fn main() {
164164
}
165165

166166
let flow_input = match case.inputs.get(index as usize) {
167-
Some(inp) => match inp.input.clone() {
168-
Some(json_input) => Some(from_json_value(json_input)),
169-
None => None,
170-
},
167+
Some(inp) => inp.input.clone().map(from_json_value),
171168
None => None,
172169
};
173170

crates/taurus/src/app/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ pub async fn run() {
5050
wait_for_shutdown(&mut worker_task, &mut health_task).await;
5151
if let Some(handle) = runtime_status_heartbeat_task.take() {
5252
handle.abort();
53-
if let Err(err) = handle.await {
54-
if !err.is_cancelled() {
53+
if let Err(err) = handle.await
54+
&& !err.is_cancelled() {
5555
log::warn!("Runtime status heartbeat task ended unexpectedly: {}", err);
5656
}
57-
}
5857
}
5958
update_stopped_status(runtime_status_service.as_ref()).await;
6059

0 commit comments

Comments
 (0)