Skip to content

Commit 033078e

Browse files
bors[bot]CAD97
andauthored
Merge #31
31: Use standard generics for TextSize::of r=CAD97 a=CAD97 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. Co-authored-by: CAD97 <[email protected]>
2 parents 7890c82 + 85935e0 commit 033078e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/size.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl TextSize {
5757
/// assert_eq!(str_size, TextSize::from(13));
5858
/// ```
5959
#[inline]
60-
pub fn of(text: impl LenTextSize) -> TextSize {
60+
pub fn of<T: LenTextSize>(text: T) -> TextSize {
6161
text.len_text_size()
6262
}
6363

0 commit comments

Comments
 (0)