pluralize doc comment verbs and add missing periods
This commit is contained in:
@@ -31,15 +31,15 @@ impl Condvar {
|
||||
#[inline]
|
||||
pub unsafe fn new() -> Condvar { Condvar(imp::Condvar::new()) }
|
||||
|
||||
/// Signal one waiter on this condition variable to wake up.
|
||||
/// Signals one waiter on this condition variable to wake up.
|
||||
#[inline]
|
||||
pub unsafe fn notify_one(&self) { self.0.notify_one() }
|
||||
|
||||
/// Awaken all current waiters on this condition variable.
|
||||
/// Awakens all current waiters on this condition variable.
|
||||
#[inline]
|
||||
pub unsafe fn notify_all(&self) { self.0.notify_all() }
|
||||
|
||||
/// Wait for a signal on the specified mutex.
|
||||
/// Waits for a signal on the specified mutex.
|
||||
///
|
||||
/// Behavior is undefined if the mutex is not locked by the current thread.
|
||||
/// Behavior is also undefined if more than one mutex is used concurrently
|
||||
@@ -47,7 +47,7 @@ impl Condvar {
|
||||
#[inline]
|
||||
pub unsafe fn wait(&self, mutex: &Mutex) { self.0.wait(mutex::raw(mutex)) }
|
||||
|
||||
/// Wait for a signal on the specified mutex with a timeout duration
|
||||
/// Waits for a signal on the specified mutex with a timeout duration
|
||||
/// specified by `dur` (a relative time into the future).
|
||||
///
|
||||
/// Behavior is undefined if the mutex is not locked by the current thread.
|
||||
@@ -58,7 +58,7 @@ impl Condvar {
|
||||
self.0.wait_timeout(mutex::raw(mutex), dur)
|
||||
}
|
||||
|
||||
/// Deallocate all resources associated with this condition variable.
|
||||
/// Deallocates all resources associated with this condition variable.
|
||||
///
|
||||
/// Behavior is undefined if there are current or will be future users of
|
||||
/// this condition variable.
|
||||
|
||||
@@ -24,14 +24,14 @@ unsafe impl Sync for Mutex {}
|
||||
pub const MUTEX_INIT: Mutex = Mutex(imp::MUTEX_INIT);
|
||||
|
||||
impl Mutex {
|
||||
/// Lock the mutex blocking the current thread until it is available.
|
||||
/// Locks the mutex blocking the current thread until it is available.
|
||||
///
|
||||
/// Behavior is undefined if the mutex has been moved between this and any
|
||||
/// previous function call.
|
||||
#[inline]
|
||||
pub unsafe fn lock(&self) { self.0.lock() }
|
||||
|
||||
/// Attempt to lock the mutex without blocking, returning whether it was
|
||||
/// Attempts to lock the mutex without blocking, returning whether it was
|
||||
/// successfully acquired or not.
|
||||
///
|
||||
/// Behavior is undefined if the mutex has been moved between this and any
|
||||
@@ -39,14 +39,14 @@ impl Mutex {
|
||||
#[inline]
|
||||
pub unsafe fn try_lock(&self) -> bool { self.0.try_lock() }
|
||||
|
||||
/// Unlock the mutex.
|
||||
/// Unlocks the mutex.
|
||||
///
|
||||
/// Behavior is undefined if the current thread does not actually hold the
|
||||
/// mutex.
|
||||
#[inline]
|
||||
pub unsafe fn unlock(&self) { self.0.unlock() }
|
||||
|
||||
/// Deallocate all resources associated with this mutex.
|
||||
/// Deallocates all resources associated with this mutex.
|
||||
///
|
||||
/// Behavior is undefined if there are current or will be future users of
|
||||
/// this mutex.
|
||||
|
||||
@@ -116,7 +116,7 @@ impl<T: Send> Error for PoisonError<T> {
|
||||
}
|
||||
|
||||
impl<T> PoisonError<T> {
|
||||
/// Create a `PoisonError`.
|
||||
/// Creates a `PoisonError`.
|
||||
#[unstable(feature = "std_misc")]
|
||||
pub fn new(guard: T) -> PoisonError<T> {
|
||||
PoisonError { guard: guard }
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct RWLock(imp::RWLock);
|
||||
pub const RWLOCK_INIT: RWLock = RWLock(imp::RWLOCK_INIT);
|
||||
|
||||
impl RWLock {
|
||||
/// Acquire shared access to the underlying lock, blocking the current
|
||||
/// Acquires shared access to the underlying lock, blocking the current
|
||||
/// thread to do so.
|
||||
///
|
||||
/// Behavior is undefined if the rwlock has been moved between this and any
|
||||
@@ -29,7 +29,7 @@ impl RWLock {
|
||||
#[inline]
|
||||
pub unsafe fn read(&self) { self.0.read() }
|
||||
|
||||
/// Attempt to acquire shared access to this lock, returning whether it
|
||||
/// Attempts to acquire shared access to this lock, returning whether it
|
||||
/// succeeded or not.
|
||||
///
|
||||
/// This function does not block the current thread.
|
||||
@@ -39,7 +39,7 @@ impl RWLock {
|
||||
#[inline]
|
||||
pub unsafe fn try_read(&self) -> bool { self.0.try_read() }
|
||||
|
||||
/// Acquire write access to the underlying lock, blocking the current thread
|
||||
/// Acquires write access to the underlying lock, blocking the current thread
|
||||
/// to do so.
|
||||
///
|
||||
/// Behavior is undefined if the rwlock has been moved between this and any
|
||||
@@ -47,7 +47,7 @@ impl RWLock {
|
||||
#[inline]
|
||||
pub unsafe fn write(&self) { self.0.write() }
|
||||
|
||||
/// Attempt to acquire exclusive access to this lock, returning whether it
|
||||
/// Attempts to acquire exclusive access to this lock, returning whether it
|
||||
/// succeeded or not.
|
||||
///
|
||||
/// This function does not block the current thread.
|
||||
@@ -57,20 +57,20 @@ impl RWLock {
|
||||
#[inline]
|
||||
pub unsafe fn try_write(&self) -> bool { self.0.try_write() }
|
||||
|
||||
/// Unlock previously acquired shared access to this lock.
|
||||
/// Unlocks previously acquired shared access to this lock.
|
||||
///
|
||||
/// Behavior is undefined if the current thread does not have shared access.
|
||||
#[inline]
|
||||
pub unsafe fn read_unlock(&self) { self.0.read_unlock() }
|
||||
|
||||
/// Unlock previously acquired exclusive access to this lock.
|
||||
/// Unlocks previously acquired exclusive access to this lock.
|
||||
///
|
||||
/// Behavior is undefined if the current thread does not currently have
|
||||
/// exclusive access.
|
||||
#[inline]
|
||||
pub unsafe fn write_unlock(&self) { self.0.write_unlock() }
|
||||
|
||||
/// Destroy OS-related resources with this RWLock.
|
||||
/// Destroys OS-related resources with this RWLock.
|
||||
///
|
||||
/// Behavior is undefined if there are any currently active users of this
|
||||
/// lock.
|
||||
|
||||
@@ -207,7 +207,7 @@ impl StaticKey {
|
||||
}
|
||||
|
||||
impl Key {
|
||||
/// Create a new managed OS TLS key.
|
||||
/// Creates a new managed OS TLS key.
|
||||
///
|
||||
/// This key will be deallocated when the key falls out of scope.
|
||||
///
|
||||
|
||||
@@ -69,7 +69,7 @@ impl fmt::Debug for CodePoint {
|
||||
}
|
||||
|
||||
impl CodePoint {
|
||||
/// Unsafely create a new `CodePoint` without checking the value.
|
||||
/// Unsafely creates a new `CodePoint` without checking the value.
|
||||
///
|
||||
/// Only use when `value` is known to be less than or equal to 0x10FFFF.
|
||||
#[inline]
|
||||
@@ -77,9 +77,9 @@ impl CodePoint {
|
||||
CodePoint { value: value }
|
||||
}
|
||||
|
||||
/// Create a new `CodePoint` if the value is a valid code point.
|
||||
/// Creates a new `CodePoint` if the value is a valid code point.
|
||||
///
|
||||
/// Return `None` if `value` is above 0x10FFFF.
|
||||
/// Returns `None` if `value` is above 0x10FFFF.
|
||||
#[inline]
|
||||
pub fn from_u32(value: u32) -> Option<CodePoint> {
|
||||
match value {
|
||||
@@ -88,7 +88,7 @@ impl CodePoint {
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new `CodePoint` from a `char`.
|
||||
/// Creates a new `CodePoint` from a `char`.
|
||||
///
|
||||
/// Since all Unicode scalar values are code points, this always succeeds.
|
||||
#[inline]
|
||||
@@ -96,15 +96,15 @@ impl CodePoint {
|
||||
CodePoint { value: value as u32 }
|
||||
}
|
||||
|
||||
/// Return the numeric value of the code point.
|
||||
/// Returns the numeric value of the code point.
|
||||
#[inline]
|
||||
pub fn to_u32(&self) -> u32 {
|
||||
self.value
|
||||
}
|
||||
|
||||
/// Optionally return a Unicode scalar value for the code point.
|
||||
/// Optionally returns a Unicode scalar value for the code point.
|
||||
///
|
||||
/// Return `None` if the code point is a surrogate (from U+D800 to U+DFFF).
|
||||
/// Returns `None` if the code point is a surrogate (from U+D800 to U+DFFF).
|
||||
#[inline]
|
||||
pub fn to_char(&self) -> Option<char> {
|
||||
match self.value {
|
||||
@@ -113,9 +113,9 @@ impl CodePoint {
|
||||
}
|
||||
}
|
||||
|
||||
/// Return a Unicode scalar value for the code point.
|
||||
/// Returns a Unicode scalar value for the code point.
|
||||
///
|
||||
/// Return `'\u{FFFD}'` (the replacement character “<>”)
|
||||
/// Returns `'\u{FFFD}'` (the replacement character “<>”)
|
||||
/// if the code point is a surrogate (from U+D800 to U+DFFF).
|
||||
#[inline]
|
||||
pub fn to_char_lossy(&self) -> char {
|
||||
@@ -151,19 +151,19 @@ impl fmt::Debug for Wtf8Buf {
|
||||
}
|
||||
|
||||
impl Wtf8Buf {
|
||||
/// Create an new, empty WTF-8 string.
|
||||
/// Creates an new, empty WTF-8 string.
|
||||
#[inline]
|
||||
pub fn new() -> Wtf8Buf {
|
||||
Wtf8Buf { bytes: Vec::new() }
|
||||
}
|
||||
|
||||
/// Create an new, empty WTF-8 string with pre-allocated capacity for `n` bytes.
|
||||
/// Creates an new, empty WTF-8 string with pre-allocated capacity for `n` bytes.
|
||||
#[inline]
|
||||
pub fn with_capacity(n: usize) -> Wtf8Buf {
|
||||
Wtf8Buf { bytes: Vec::with_capacity(n) }
|
||||
}
|
||||
|
||||
/// Create a WTF-8 string from an UTF-8 `String`.
|
||||
/// Creates a WTF-8 string from an UTF-8 `String`.
|
||||
///
|
||||
/// This takes ownership of the `String` and does not copy.
|
||||
///
|
||||
@@ -173,7 +173,7 @@ impl Wtf8Buf {
|
||||
Wtf8Buf { bytes: string.into_bytes() }
|
||||
}
|
||||
|
||||
/// Create a WTF-8 string from an UTF-8 `&str` slice.
|
||||
/// Creates a WTF-8 string from an UTF-8 `&str` slice.
|
||||
///
|
||||
/// This copies the content of the slice.
|
||||
///
|
||||
@@ -183,7 +183,7 @@ impl Wtf8Buf {
|
||||
Wtf8Buf { bytes: <[_]>::to_vec(str.as_bytes()) }
|
||||
}
|
||||
|
||||
/// Create a WTF-8 string from a potentially ill-formed UTF-16 slice of 16-bit code units.
|
||||
/// Creates a WTF-8 string from a potentially ill-formed UTF-16 slice of 16-bit code units.
|
||||
///
|
||||
/// This is lossless: calling `.encode_wide()` on the resulting string
|
||||
/// will always return the original code units.
|
||||
@@ -319,7 +319,7 @@ impl Wtf8Buf {
|
||||
self.bytes.truncate(new_len)
|
||||
}
|
||||
|
||||
/// Consume the WTF-8 string and try to convert it to UTF-8.
|
||||
/// Consumes the WTF-8 string and tries to convert it to UTF-8.
|
||||
///
|
||||
/// This does not copy the data.
|
||||
///
|
||||
@@ -333,7 +333,7 @@ impl Wtf8Buf {
|
||||
}
|
||||
}
|
||||
|
||||
/// Consume the WTF-8 string and convert it lossily to UTF-8.
|
||||
/// Consumes the WTF-8 string and converts it lossily to UTF-8.
|
||||
///
|
||||
/// This does not copy the data (but may overwrite parts of it in place).
|
||||
///
|
||||
@@ -454,7 +454,7 @@ impl fmt::Debug for Wtf8 {
|
||||
}
|
||||
|
||||
impl Wtf8 {
|
||||
/// Create a WTF-8 slice from a UTF-8 `&str` slice.
|
||||
/// Creates a WTF-8 slice from a UTF-8 `&str` slice.
|
||||
///
|
||||
/// Since WTF-8 is a superset of UTF-8, this always succeeds.
|
||||
#[inline]
|
||||
@@ -462,13 +462,13 @@ impl Wtf8 {
|
||||
unsafe { mem::transmute(value.as_bytes()) }
|
||||
}
|
||||
|
||||
/// Return the length, in WTF-8 bytes.
|
||||
/// Returns the length, in WTF-8 bytes.
|
||||
#[inline]
|
||||
pub fn len(&self) -> usize {
|
||||
self.bytes.len()
|
||||
}
|
||||
|
||||
/// Return the code point at `position` if it is in the ASCII range,
|
||||
/// Returns the code point at `position` if it is in the ASCII range,
|
||||
/// or `b'\xFF' otherwise.
|
||||
///
|
||||
/// # Panics
|
||||
@@ -482,7 +482,7 @@ impl Wtf8 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Return the code point at `position`.
|
||||
/// Returns the code point at `position`.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
@@ -494,7 +494,7 @@ impl Wtf8 {
|
||||
code_point
|
||||
}
|
||||
|
||||
/// Return the code point at `position`
|
||||
/// Returns the code point at `position`
|
||||
/// and the position of the next code point.
|
||||
///
|
||||
/// # Panics
|
||||
@@ -507,15 +507,15 @@ impl Wtf8 {
|
||||
(CodePoint { value: c }, n)
|
||||
}
|
||||
|
||||
/// Return an iterator for the string’s code points.
|
||||
/// Returns an iterator for the string’s code points.
|
||||
#[inline]
|
||||
pub fn code_points(&self) -> Wtf8CodePoints {
|
||||
Wtf8CodePoints { bytes: self.bytes.iter() }
|
||||
}
|
||||
|
||||
/// Try to convert the string to UTF-8 and return a `&str` slice.
|
||||
/// Tries to convert the string to UTF-8 and return a `&str` slice.
|
||||
///
|
||||
/// Return `None` if the string contains surrogates.
|
||||
/// Returns `None` if the string contains surrogates.
|
||||
///
|
||||
/// This does not copy the data.
|
||||
#[inline]
|
||||
@@ -528,8 +528,8 @@ impl Wtf8 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Lossily convert the string to UTF-8.
|
||||
/// Return an UTF-8 `&str` slice if the contents are well-formed in UTF-8.
|
||||
/// Lossily converts the string to UTF-8.
|
||||
/// Returns an UTF-8 `&str` slice if the contents are well-formed in UTF-8.
|
||||
///
|
||||
/// Surrogates are replaced with `"\u{FFFD}"` (the replacement character “<>”).
|
||||
///
|
||||
@@ -559,7 +559,7 @@ impl Wtf8 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert the WTF-8 string to potentially ill-formed UTF-16
|
||||
/// Converts the WTF-8 string to potentially ill-formed UTF-16
|
||||
/// and return an iterator of 16-bit code units.
|
||||
///
|
||||
/// This is lossless:
|
||||
|
||||
@@ -53,7 +53,7 @@ pub mod io {
|
||||
/// and `AsRawSocket` set of traits.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait AsRawFd {
|
||||
/// Extract the raw file descriptor.
|
||||
/// Extracts the raw file descriptor.
|
||||
///
|
||||
/// This method does **not** pass ownership of the raw file descriptor
|
||||
/// to the caller. The descriptor is only guarantee to be valid while
|
||||
@@ -216,11 +216,11 @@ pub mod ffi {
|
||||
/// Unix-specific extensions to `OsString`.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait OsStringExt {
|
||||
/// Create an `OsString` from a byte vector.
|
||||
/// Creates an `OsString` from a byte vector.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn from_vec(vec: Vec<u8>) -> Self;
|
||||
|
||||
/// Yield the underlying byte vector of this `OsString`.
|
||||
/// Yields the underlying byte vector of this `OsString`.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn into_vec(self) -> Vec<u8>;
|
||||
}
|
||||
@@ -241,7 +241,7 @@ pub mod ffi {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn from_bytes(slice: &[u8]) -> &Self;
|
||||
|
||||
/// Get the underlying byte view of the `OsStr` slice.
|
||||
/// Gets the underlying byte view of the `OsStr` slice.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn as_bytes(&self) -> &[u8];
|
||||
}
|
||||
@@ -280,7 +280,7 @@ pub mod fs {
|
||||
|
||||
/// Unix-specific extensions to `OpenOptions`
|
||||
pub trait OpenOptionsExt {
|
||||
/// Set the mode bits that a new file will be created with.
|
||||
/// Sets the mode bits that a new file will be created with.
|
||||
///
|
||||
/// If a new file is created as part of a `File::open_opts` call then this
|
||||
/// specified `mode` will be used as the permission bits for the new file.
|
||||
|
||||
@@ -28,7 +28,7 @@ impl FileDesc {
|
||||
|
||||
pub fn raw(&self) -> c_int { self.fd }
|
||||
|
||||
/// Extract the actual filedescriptor without closing it.
|
||||
/// Extracts the actual filedescriptor without closing it.
|
||||
pub fn into_raw(self) -> c_int {
|
||||
let fd = self.fd;
|
||||
unsafe { mem::forget(self) };
|
||||
|
||||
@@ -130,7 +130,7 @@ impl FileDesc {
|
||||
}
|
||||
}
|
||||
|
||||
/// Extract the actual filedescriptor without closing it.
|
||||
/// Extracts the actual filedescriptor without closing it.
|
||||
pub fn unwrap(self) -> fd_t {
|
||||
let fd = self.fd;
|
||||
unsafe { mem::forget(self) };
|
||||
|
||||
@@ -85,7 +85,7 @@ pub fn last_gai_error(s: libc::c_int) -> IoError {
|
||||
err
|
||||
}
|
||||
|
||||
/// Convert an `errno` value into a high-level error variant and description.
|
||||
/// Converts an `errno` value into a high-level error variant and description.
|
||||
#[allow(deprecated)]
|
||||
pub fn decode_error(errno: i32) -> IoError {
|
||||
// FIXME: this should probably be a bit more descriptive...
|
||||
|
||||
@@ -86,7 +86,7 @@ pub fn errno() -> i32 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a detailed string description for the given error number
|
||||
/// Gets a detailed string description for the given error number.
|
||||
pub fn error_string(errno: i32) -> String {
|
||||
#[cfg(target_os = "linux")]
|
||||
extern {
|
||||
|
||||
@@ -38,7 +38,7 @@ pub mod io {
|
||||
/// Extract raw handles.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait AsRawHandle {
|
||||
/// Extract the raw handle, without taking any ownership.
|
||||
/// Extracts the raw handle, without taking any ownership.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn as_raw_handle(&self) -> RawHandle;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ pub mod io {
|
||||
#[unstable(feature = "from_raw_os",
|
||||
reason = "recent addition to the std::os::windows::io module")]
|
||||
pub trait FromRawHandle {
|
||||
/// Construct a new I/O object from the specified raw handle.
|
||||
/// Constructs a new I/O object from the specified raw handle.
|
||||
///
|
||||
/// This function will **consume ownership** of the handle given,
|
||||
/// passing responsibility for closing the handle to the returned
|
||||
@@ -112,7 +112,7 @@ pub mod io {
|
||||
/// Extract raw sockets.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait AsRawSocket {
|
||||
/// Extract the underlying raw socket from this object.
|
||||
/// Extracts the underlying raw socket from this object.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
fn as_raw_socket(&self) -> RawSocket;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ pub mod ffi {
|
||||
/// Windows-specific extensions to `OsString`.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait OsStringExt {
|
||||
/// Create an `OsString` from a potentially ill-formed UTF-16 slice of
|
||||
/// Creates an `OsString` from a potentially ill-formed UTF-16 slice of
|
||||
/// 16-bit code units.
|
||||
///
|
||||
/// This is lossless: calling `.encode_wide()` on the resulting string
|
||||
@@ -233,7 +233,7 @@ pub mod ffi {
|
||||
/// Windows-specific extensions to `OsStr`.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub trait OsStrExt {
|
||||
/// Re-encode an `OsStr` as a wide character sequence,
|
||||
/// Re-encodes an `OsStr` as a wide character sequence,
|
||||
/// i.e. potentially ill-formed UTF-16.
|
||||
///
|
||||
/// This is lossless. Note that the encoding does not include a final
|
||||
@@ -258,25 +258,25 @@ pub mod fs {
|
||||
|
||||
/// Windows-specific extensions to `OpenOptions`
|
||||
pub trait OpenOptionsExt {
|
||||
/// Override the `dwDesiredAccess` argument to the call to `CreateFile`
|
||||
/// Overrides the `dwDesiredAccess` argument to the call to `CreateFile`
|
||||
/// with the specified value.
|
||||
fn desired_access(&mut self, access: i32) -> &mut Self;
|
||||
|
||||
/// Override the `dwCreationDisposition` argument to the call to
|
||||
/// Overrides the `dwCreationDisposition` argument to the call to
|
||||
/// `CreateFile` with the specified value.
|
||||
///
|
||||
/// This will override any values of the standard `create` flags, for
|
||||
/// example.
|
||||
fn creation_disposition(&mut self, val: i32) -> &mut Self;
|
||||
|
||||
/// Override the `dwFlagsAndAttributes` argument to the call to
|
||||
/// Overrides the `dwFlagsAndAttributes` argument to the call to
|
||||
/// `CreateFile` with the specified value.
|
||||
///
|
||||
/// This will override any values of the standard flags on the
|
||||
/// `OpenOptions` structure.
|
||||
fn flags_and_attributes(&mut self, val: i32) -> &mut Self;
|
||||
|
||||
/// Override the `dwShareMode` argument to the call to `CreateFile` with
|
||||
/// Overrides the `dwShareMode` argument to the call to `CreateFile` with
|
||||
/// the specified value.
|
||||
///
|
||||
/// This will override any values of the standard flags on the
|
||||
|
||||
@@ -95,7 +95,7 @@ pub fn last_gai_error(_errno: i32) -> IoError {
|
||||
last_net_error()
|
||||
}
|
||||
|
||||
/// Convert an `errno` value into a high-level error variant and description.
|
||||
/// Converts an `errno` value into a high-level error variant and description.
|
||||
#[allow(deprecated)]
|
||||
pub fn decode_error(errno: i32) -> IoError {
|
||||
let (kind, desc) = match errno {
|
||||
|
||||
@@ -42,7 +42,7 @@ pub fn errno() -> i32 {
|
||||
unsafe { libc::GetLastError() as i32 }
|
||||
}
|
||||
|
||||
/// Get a detailed string description for the given error number
|
||||
/// Gets a detailed string description for the given error number.
|
||||
pub fn error_string(errnum: i32) -> String {
|
||||
use libc::types::os::arch::extra::DWORD;
|
||||
use libc::types::os::arch::extra::LPWSTR;
|
||||
|
||||
Reference in New Issue
Block a user