Unnamed repository; edit this file 'description' to name the repository.
Use standard generics for TextSize::of
There is no specific reason to use APIT here, so prefer the form that allows more control for the user, in the form of the turbofish.
CAD97 2020-03-26
parent 84d071b · commit 9cca8e2
-rw-r--r--lib/text-size/src/size.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/text-size/src/size.rs b/lib/text-size/src/size.rs
index e20763f4bc..171f337777 100644
--- a/lib/text-size/src/size.rs
+++ b/lib/text-size/src/size.rs
@@ -57,7 +57,7 @@ impl TextSize {
/// assert_eq!(str_size, TextSize::from(13));
/// ```
#[inline]
- pub fn of(text: impl LenTextSize) -> TextSize {
+ pub fn of<T: LenTextSize>(text: T) -> TextSize {
text.len_text_size()
}