mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-15 00:13:02 +00:00
rollup merge of #19015: alex/libcore-typos
This commit is contained in:
commit
789777babd
@ -88,7 +88,7 @@ pub fn align_of_val<T>(_val: &T) -> uint {
|
|||||||
|
|
||||||
/// Create a value initialized to zero.
|
/// Create a value initialized to zero.
|
||||||
///
|
///
|
||||||
/// This function is similar to allocating space for a a local variable and
|
/// This function is similar to allocating space for a local variable and
|
||||||
/// zeroing it out (an unsafe operation).
|
/// zeroing it out (an unsafe operation).
|
||||||
///
|
///
|
||||||
/// Care must be taken when using this function, if the type `T` has a
|
/// Care must be taken when using this function, if the type `T` has a
|
||||||
|
@ -198,7 +198,7 @@ pub trait Int
|
|||||||
/// ```
|
/// ```
|
||||||
fn swap_bytes(self) -> Self;
|
fn swap_bytes(self) -> Self;
|
||||||
|
|
||||||
/// Convert a integer from big endian to the target's endianness.
|
/// Convert an integer from big endian to the target's endianness.
|
||||||
///
|
///
|
||||||
/// On big endian this is a no-op. On little endian the bytes are swapped.
|
/// On big endian this is a no-op. On little endian the bytes are swapped.
|
||||||
///
|
///
|
||||||
@ -220,7 +220,7 @@ pub trait Int
|
|||||||
if cfg!(target_endian = "big") { x } else { x.swap_bytes() }
|
if cfg!(target_endian = "big") { x } else { x.swap_bytes() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert a integer from little endian to the target's endianness.
|
/// Convert an integer from little endian to the target's endianness.
|
||||||
///
|
///
|
||||||
/// On little endian this is a no-op. On big endian the bytes are swapped.
|
/// On little endian this is a no-op. On big endian the bytes are swapped.
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user