mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-23 08:48:08 +00:00
Clarify size of SmolStr better
This commit is contained in:
parent
8f9fefd8a0
commit
4ad02f720f
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue