Clarify size of SmolStr better

This commit is contained in:
Lukas Wirth 2023-03-31 07:37:08 +02:00
parent 8f9fefd8a0
commit 4ad02f720f
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@
A `SmolStr` is a string type that has the following properties:
* `size_of::<SmolStr>() == size_of::<String>()`
* `size_of::<SmolStr>() == 24 (therefor == size_of::<String>() on 64 bit platforms)
* `Clone` is `O(1)`
* Strings are stack-allocated if they are:
* Up to 23 bytes long

View file

@ -19,7 +19,7 @@ use core::{
/// A `SmolStr` is a string type that has the following properties:
///
/// * `size_of::<SmolStr>() == size_of::<String>()`
/// * `size_of::<SmolStr>() == 24 (therefor == size_of::<String>() on 64 bit platforms)
/// * `Clone` is `O(1)`
/// * Strings are stack-allocated if they are:
/// * Up to 23 bytes long