From fadc33e2ba3629c5be5d93dc63aafe8a3d22d35b Mon Sep 17 00:00:00 2001 From: William Lyles <26171886+wilyle@users.noreply.github.com> Date: Mon, 25 Mar 2024 14:30:21 -0700 Subject: [PATCH] fix clippy --- .../mqtt_connector/src/mqtt_connector.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/cloud_connectors/mqtt_connector/src/mqtt_connector.rs b/cloud_connectors/mqtt_connector/src/mqtt_connector.rs index e577691..31bdfc6 100644 --- a/cloud_connectors/mqtt_connector/src/mqtt_connector.rs +++ b/cloud_connectors/mqtt_connector/src/mqtt_connector.rs @@ -189,14 +189,16 @@ mod azure_cloud_connector_tests { mqtt_event_grid_topic: String::new(), }; - let mut request = UpdateDigitalTwinRequest::default(); - request.value = Some(Value { - kind: Some(Kind::StringValue(String::new())), - }); - - let request = tonic::Request::new(request); + let request = UpdateDigitalTwinRequest { + value: Some(Value { + kind: Some(Kind::StringValue(String::new())), + }), + ..Default::default() + }; - let result = consumer_impl.update_digital_twin(request).await; + let result = consumer_impl + .update_digital_twin(tonic::Request::new(request)) + .await; assert!(result.is_err()); }