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()); }