de-vri-es / serial2-rs

Cross platform serial ports for Rust
Other
41 stars 10 forks source link

`write` and `write_vectored` functions on Unix systems use `read_timeout_ms` instead of `write_timeout_ms` #26

Closed Polprzewodnikowy closed 4 months ago

Polprzewodnikowy commented 4 months ago

Code in question is here: https://github.com/de-vri-es/serial2-rs/blob/main/src/sys/unix/mod.rs#L222-L224

Looks like a copy-paste bug from read function, but I'd like to confirm if write functions should use self.write_timeout_ms value.

de-vri-es commented 4 months ago

Oops, this is definitely a copy-pasta bug. Thanks for reporting it!

Do you want to send a PR to fix it, or shall I?

Polprzewodnikowy commented 4 months ago

I've made PR here: https://github.com/de-vri-es/serial2-rs/pull/28

de-vri-es commented 4 months ago

Released with v0.2.20. Thanks for reporting and fixing the issue!