File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " cvt"
3
- version = " 0.1.0 "
3
+ version = " 0.1.1 "
4
4
authors = [
" Marcin Mielniczuk <[email protected] >" ]
5
5
edition = " 2018"
6
6
license = " Apache-2.0"
Original file line number Diff line number Diff line change 7
7
[ crates-io ] : https://crates.io/crates/cvt
8
8
9
9
This package exposes the ` cvt ` function used extensively by ` libstd ` to
10
- convert platform-specific syscall error codes.
10
+ convert platform-specific syscall error codes to ` std::io::Result ` .
11
11
12
- The code was mostly copied over from Rust libstd.
12
+ Usually syscalls use return values for errors, the conventions differ. For instance,
13
+ on Unix ` 0 ` means success on Unix but failure on Windows.
14
+
15
+ While those conventions are not always followed, they usually are and
16
+ ` cvt ` is there to reduce the mental bookkeeping and make it easier to handle syscall errors.
17
+
18
+ The code was mostly copied over from Rust libstd, because the function is not public.
Original file line number Diff line number Diff line change
1
+ //! This package exposes the `cvt` function used extensively by `libstd` to
2
+ //! convert platform-specific syscall error codes to `std::io::Result`.
3
+ //!
4
+ //! Usually syscalls use return values for errors, the conventions differ. For instance,
5
+ //! on Unix `0` usually means success on Unix but failure on Windows.
6
+ //! While those conventions are not always followed, they usually are and
7
+ //! `cvt` is there to reduce the mental bookkeeping and make it easier to handle syscall errors.
8
+ //!
9
+ //! The code was mostly copied over from Rust libstd, because the function is not public.
10
+
1
11
cfg_if:: cfg_if! {
2
12
if #[ cfg( target_os = "vxworks" ) ] {
3
13
mod vxworks;
You can’t perform that action at this time.
0 commit comments