Skip to content

fix: use io::Error::last_os_error instead of custom errno logic

Dmitry Rodionov requested to merge dkr/fix-errno-on-mac-os into master

Summary

  • fix: use io::Error::last_os_error instead of custom errno logic

It was discovered when I attempted to bump tarantool module version in picodata: https://git.picodata.io/picodata/picodata/picodata/-/jobs/79522

This is why I prefer to delegate this kind of stuff to libraries (even small third party ones).

As it turns out needed API is already available in std: https://doc.rust-lang.org/std/io/struct.Error.html#method.last_os_error

(suggested by @funbringer)

Also this is another case when better testing pipeline would've saved us.

Should we start moving module into picodata repo rather soon?

Ensure that

  • New code is covered by tests
  • API is documented
  • Changelog is up to date
  • Version is bumped in the appropriate Cargo.toml files
Edited by Dmitry Rodionov

Merge request reports