Skip to content

Commit d79b752

Browse files
authored
Merge branch 'main' into fix/morse-flowtap-jam
2 parents b95ecc2 + 5a5f326 commit d79b752

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

rmk/src/split/serial/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ mod tests {
192192
fn two_bundled_messages_do_not_trigger_extra_read() {
193193
let status = rmk_types::connection::ConnectionStatus::new();
194194
let mut bundled = encode(&SplitMessage::LedState(true));
195-
bundled.extend_from_slice(&encode(&SplitMessage::ConnectionState(status)));
195+
bundled.extend_from_slice(&encode(&SplitMessage::ConnectionStatus(status)));
196196

197197
let fake = FakeSerial::new([bundled]);
198198
let mut drv = SerialSplitDriver::new(fake);
@@ -202,8 +202,8 @@ mod tests {
202202

203203
let m2 = block_on(drv.read()).expect("second read should not touch serial");
204204
match m2 {
205-
SplitMessage::ConnectionState(s) => assert_eq!(s, status),
206-
other => panic!("expected ConnectionState, got {:?}", other),
205+
SplitMessage::ConnectionStatus(s) => assert_eq!(s, status),
206+
other => panic!("expected ConnectionStatus, got {:?}", other),
207207
}
208208

209209
assert_eq!(drv.serial.read_calls, 1);
@@ -217,7 +217,7 @@ mod tests {
217217
fn trailing_partial_message_is_carried_over() {
218218
let status = rmk_types::connection::ConnectionStatus::new();
219219
let full1 = encode(&SplitMessage::LedState(true));
220-
let full2 = encode(&SplitMessage::ConnectionState(status));
220+
let full2 = encode(&SplitMessage::ConnectionStatus(status));
221221
let (prefix, suffix) = full2.split_at(full2.len() / 2);
222222

223223
let mut first_chunk = full1;
@@ -231,8 +231,8 @@ mod tests {
231231

232232
let m2 = block_on(drv.read()).expect("second read should succeed");
233233
match m2 {
234-
SplitMessage::ConnectionState(s) => assert_eq!(s, status),
235-
other => panic!("expected ConnectionState, got {:?}", other),
234+
SplitMessage::ConnectionStatus(s) => assert_eq!(s, status),
235+
other => panic!("expected ConnectionStatus, got {:?}", other),
236236
}
237237

238238
assert_eq!(drv.serial.read_calls, 2);

0 commit comments

Comments
 (0)