Skip to content

Commit 568b7d4

Browse files
committed
Update template
1 parent 37f8f69 commit 568b7d4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

generator/sbpg/targets/resources/rust/test/sbp_tests_template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn test_(((s.suite_name|snake_case)))()
5151
match &sbp_msg {
5252
sbp::messages::Sbp::(((t.msg.name|lower_acronyms)))(msg) => {
5353
let msg_type = msg.message_type().unwrap();
54-
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {}", msg_type);
54+
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {msg_type}");
5555
let sender_id = msg.sender_id().unwrap();
5656
assert_eq!(sender_id, (((t.sbp.sender))), "incorrect sender id, expected (((t.sbp.sender))), is {sender_id}");
5757
((*- for f in t.fieldskeys *))(((compare_value( (((f))), (((t.fields[f]))) ))))((*- endfor *))

rust/sbp2json/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ impl std::str::FromStr for ErrorHandlerOptions {
3030
}
3131

3232
s => Err(format!(
33-
"Unable to cast option {} to a valid error handler option. \
33+
"Unable to cast option {s} to a valid error handler option. \
3434
Valid options are 'return', 'skip', & 'to-invalid')",
35-
s
3635
)),
3736
}
3837
}

0 commit comments

Comments
 (0)