Benjamin Peter

Results 5 comments of Benjamin Peter

Hi, Thanks for the feedback ! I need to also update the examples with the new client API to correctly `assert` on error. ```rust // Now we try to read...

I tried it with our `modbus` client wrapper around `tokio_modbus` that does automatic re-connection on `io::Error`, and it works great ! 🎉 I can match on `io::Error` and spawn a...

I have just one small question regarding the use of `unreachable` in the client side. Can you confirm that the paths with `unreachable!` are indeed not supposed to happen ?...

Agreed, For me, going down the `unreachable` path in this case: ```rust self.client .call(Request::ReadCoils(addr, cnt)) .await .map(|modbus_rsp| { modbus_rsp.map(|rsp| match rsp { Response::ReadCoils(mut coils) => { debug_assert!(coils.len() >= cnt.into()); coils.truncate(cnt.into());...

Moved `verify_response_header` function in the parent module to use the same function in `rtu` and `tcp` impl. Added dev doc comments to explain why the `unreachable!` macro is used here....