File tree Expand file tree Collapse file tree 6 files changed +9
-8
lines changed
common/tedge_config_macros/src
tedge_agent/src/operation_workflows
plugins/c8y_remote_access_plugin/src Expand file tree Collapse file tree 6 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ mod tests {
416
416
} ) ;
417
417
let dto: TEdgeConfigDto = serde_json:: from_value ( val. clone ( ) ) . unwrap ( ) ;
418
418
419
- assert_eq ! ( serde_json:: to_value( & dto) . unwrap( ) , val) ;
419
+ assert_eq ! ( serde_json:: to_value( dto) . unwrap( ) , val) ;
420
420
}
421
421
422
422
#[ test]
@@ -431,7 +431,7 @@ mod tests {
431
431
} ) ;
432
432
let dto: TEdgeConfigDto = serde_json:: from_value ( val. clone ( ) ) . unwrap ( ) ;
433
433
434
- assert_eq ! ( serde_json:: to_value( & dto) . unwrap( ) , val) ;
434
+ assert_eq ! ( serde_json:: to_value( dto) . unwrap( ) , val) ;
435
435
}
436
436
437
437
#[ test]
Original file line number Diff line number Diff line change @@ -718,7 +718,7 @@ fn check_device_status_azure(
718
718
if tedge_config. mqtt . bridge . built_in {
719
719
client. subscribe ( & built_in_bridge_health, AtLeastOnce ) ?;
720
720
}
721
- client. subscribe ( & azure_topic_device_twin_downstream, AtLeastOnce ) ?;
721
+ client. subscribe ( azure_topic_device_twin_downstream, AtLeastOnce ) ?;
722
722
723
723
let mut err = None ;
724
724
for event in connection. iter ( ) {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ pub(crate) fn get_connected_c8y_url(
33
33
let mut acknowledged = false ;
34
34
let mut c8y_url: Option < String > = None ;
35
35
36
- client. subscribe ( & c8y_topic_builtin_jwt_token_downstream, AtLeastOnce ) ?;
36
+ client. subscribe ( c8y_topic_builtin_jwt_token_downstream, AtLeastOnce ) ?;
37
37
let mut err = None ;
38
38
39
39
for event in connection. iter ( ) {
Original file line number Diff line number Diff line change @@ -102,12 +102,13 @@ impl WorkflowRepository {
102
102
for entry in dir_path. read_dir_utf8 ( ) ?. flatten ( ) {
103
103
let file = entry. path ( ) ;
104
104
if file. extension ( ) == Some ( "toml" ) {
105
- match read_operation_workflow ( file)
105
+ let result = read_operation_workflow ( file)
106
106
. await
107
107
. and_then ( |( workflow, version) | {
108
108
let file_source = source. set_inner ( file. into ( ) ) ;
109
109
self . load_operation_workflow ( file_source, workflow, version)
110
- } ) {
110
+ } ) ;
111
+ match result {
111
112
Ok ( cmd) => {
112
113
info ! (
113
114
"Using operation workflow definition from {file:?} for '{cmd}' operation"
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ impl GenericCommandState {
196
196
o. insert ( key. into ( ) , val. into ( ) ) ;
197
197
}
198
198
if key == STATUS {
199
- self . status = val. to_owned ( ) ;
199
+ val. clone_into ( & mut self . status )
200
200
}
201
201
}
202
202
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ impl RemoteAccessConnect {
130
130
stdin. read_line ( & mut command) . unwrap ( ) ;
131
131
132
132
// If it's a smartrest message, it contains a ','
133
- if !command. contains ( "," ) {
133
+ if !command. contains ( ',' ) {
134
134
c8y_profile = Some ( command. trim ( ) . parse ( ) . expect ( "Parsing profile name" ) ) ;
135
135
command. clear ( ) ;
136
136
stdin. read_line ( & mut command) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments