Skip to content

Commit

Permalink
docs: redraw layout diagram with box drawing characters. (#539)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
adeschamps authored Mar 25, 2022
1 parent d4f5023 commit e4c7236
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use crate::Buf;
/// # Sharing
///
/// `Bytes` contains a vtable, which allows implementations of `Bytes` to define
/// how sharing/cloneing is implemented in detail.
/// how sharing/cloning is implemented in detail.
/// When `Bytes::clone()` is called, `Bytes` will call the vtable function for
/// cloning the backing storage in order to share it behind between multiple
/// `Bytes` instances.
Expand All @@ -78,18 +78,18 @@ use crate::Buf;
///
/// ```text
///
/// Arc ptrs +---------+
/// ________________________ / | Bytes 2 |
/// / +---------+
/// / +-----------+ | |
/// |_________/ | Bytes 1 | | |
/// | +-----------+ | |
/// Arc ptrs ┌─────────┐
/// ________________________ / Bytes 2
/// / └─────────┘
/// / ┌───────────┐ | |
/// |_________/ Bytes 1 | |
/// | └───────────┘ | |
/// | | | ___/ data | tail
/// | data | tail |/ |
/// v v v v
/// +-----+---------------------------------+-----+
/// | Arc | | | | |
/// +-----+---------------------------------+-----+
/// ┌─────┬─────┬───────────┬───────────────┬─────┐
/// Arc
/// └─────┴─────┴───────────┴───────────────┴─────┘
/// ```
pub struct Bytes {
ptr: *const u8,
Expand Down

0 comments on commit e4c7236

Please sign in to comment.