From 628dea4f103b39767bedfa59031b34c36a65c44f Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Mon, 21 Oct 2019 02:04:10 +0700 Subject: [PATCH] chore: fix layout table rendering --- src/type-layout.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/type-layout.md b/src/type-layout.md index b0cc71a734963..2afcf80490d95 100644 --- a/src/type-layout.md +++ b/src/type-layout.md @@ -34,22 +34,22 @@ alignment of the type respectively. The size of most primitives is given in this table. -Type | `size_of::()` -- | - | - -bool | 1 -u8 | 1 -u16 | 2 -u32 | 4 -u64 | 8 -u128 | 16 -i8 | 1 -i16 | 2 -i32 | 4 -i64 | 8 -i128 | 16 -f32 | 4 -f64 | 8 -char | 4 +|Type | `size_of::()`| +|-- |-- | +|bool | 1 | +|u8 | 1 | +|u16 | 2 | +|u32 | 4 | +|u64 | 8 | +|u128 | 16 | +|i8 | 1 | +|i16 | 2 | +|i32 | 4 | +|i64 | 8 | +|i128 | 16 | +|f32 | 4 | +|f64 | 8 | +|char | 4 | `usize` and `isize` have a size big enough to contain every address on the target platform. For example, on a 32 bit target, this is 4 bytes and on a 64