Fix doc nits
Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits. https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
This commit is contained in:
parent
83d67685ac
commit
a19472a93e
146 changed files with 808 additions and 738 deletions
|
@ -308,7 +308,7 @@ macro_rules! impl_is_minus_one {
|
|||
|
||||
impl_is_minus_one! { i8 i16 i32 i64 isize }
|
||||
|
||||
/// Convert native return values to Result using the *-1 means error is in `errno`* convention.
|
||||
/// Converts native return values to Result using the *-1 means error is in `errno`* convention.
|
||||
/// Non-error values are `Ok`-wrapped.
|
||||
pub fn cvt<T: IsMinusOne>(t: T) -> crate::io::Result<T> {
|
||||
if t.is_minus_one() { Err(crate::io::Error::last_os_error()) } else { Ok(t) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue