Skip to content

Commit

Permalink
Improve documentation for RcStr
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed Jul 10, 2024
1 parent abb4c04 commit 28082e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/turbo-tasks/src/rcstr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ use turbo_tasks_hash::{DeterministicHash, DeterministicHasher};

use crate::debug::{ValueDebugFormat, ValueDebugFormatString};

/// This type exists to allow swapping out the underlying string type easily.
/// A reference counted [`String`], similar to [`Arc<String>`][std::sync::Arc].
///
/// This type is intentionally opaque allow for future optimizations to the
/// underlying representation. Future implementations may use inline
/// representations or interning.
//
// If you want to change the underlying string type to `Arc<str>`, please ensure that you profile
// performance. The current implementation offers very cheap `String -> RcStr -> String`, meaning we
Expand Down

0 comments on commit 28082e2

Please sign in to comment.