Unnamed repository; edit this file 'description' to name the repository.
Merge rust-analyzer/text-size#46
46: Fix TextSize::of docs to no longer suggest implementing TextLen r=matklad a=CAD97
Addresses the misleading docs part of rust-analyzer/text-size#45 by editing the docs back to their minimum. Does not yet provide advice on idioms for non-primitive types.
Co-authored-by: CAD97 <[email protected]>
| -rw-r--r-- | lib/text-size/src/size.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/text-size/src/size.rs b/lib/text-size/src/size.rs index 105e158ca4..ab2ec9a730 100644 --- a/lib/text-size/src/size.rs +++ b/lib/text-size/src/size.rs @@ -33,11 +33,9 @@ impl fmt::Debug for TextSize { } impl TextSize { - /// The text size of some text-like object. + /// The text size of some primitive text-like object. /// - /// Accepts `char`, `&str`, and references to any custom string-like type - /// that dereferences to `str`. Types that don't dereference to `str` but - /// want to be usable in this constructor can implement [`TextLen`]. + /// Accepts `char`, `&str`, and `&String`. /// /// # Examples /// |