Skip to content

Commit e4c7236

Browse files
authored
docs: redraw layout diagram with box drawing characters. (#539)
I find this diagram very helpful, but a little hard to distinguish between the boxes and the lines that connect them. This commit redraws the boxes with line drawing characters so that the boxes appear a little more solid, and stand out from the other lines.
1 parent d4f5023 commit e4c7236

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/bytes.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use crate::Buf;
5555
/// # Sharing
5656
///
5757
/// `Bytes` contains a vtable, which allows implementations of `Bytes` to define
58-
/// how sharing/cloneing is implemented in detail.
58+
/// how sharing/cloning is implemented in detail.
5959
/// When `Bytes::clone()` is called, `Bytes` will call the vtable function for
6060
/// cloning the backing storage in order to share it behind between multiple
6161
/// `Bytes` instances.
@@ -78,18 +78,18 @@ use crate::Buf;
7878
///
7979
/// ```text
8080
///
81-
/// Arc ptrs +---------+
82-
/// ________________________ / | Bytes 2 |
83-
/// / +---------+
84-
/// / +-----------+ | |
85-
/// |_________/ | Bytes 1 | | |
86-
/// | +-----------+ | |
81+
/// Arc ptrs ┌─────────┐
82+
/// ________________________ / Bytes 2
83+
/// / └─────────┘
84+
/// / ┌───────────┐ | |
85+
/// |_________/ Bytes 1 | |
86+
/// | └───────────┘ | |
8787
/// | | | ___/ data | tail
8888
/// | data | tail |/ |
8989
/// v v v v
90-
/// +-----+---------------------------------+-----+
91-
/// | Arc | | | | |
92-
/// +-----+---------------------------------+-----+
90+
/// ┌─────┬─────┬───────────┬───────────────┬─────┐
91+
/// Arc
92+
/// └─────┴─────┴───────────┴───────────────┴─────┘
9393
/// ```
9494
pub struct Bytes {
9595
ptr: *const u8,

0 commit comments

Comments
 (0)