File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1571,7 +1571,7 @@ impl PrimitiveType {
1571
1571
None
1572
1572
}
1573
1573
1574
- pub fn to_string ( & self ) -> & ' static str {
1574
+ pub fn as_str ( & self ) -> & ' static str {
1575
1575
match * self {
1576
1576
PrimitiveType :: Isize => "isize" ,
1577
1577
PrimitiveType :: I8 => "i8" ,
@@ -1596,7 +1596,7 @@ impl PrimitiveType {
1596
1596
}
1597
1597
1598
1598
pub fn to_url_str ( & self ) -> & ' static str {
1599
- self . to_string ( )
1599
+ self . as_str ( )
1600
1600
}
1601
1601
1602
1602
/// Creates a rustdoc-specific node id for primitive types.
Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ impl fmt::Display for clean::Type {
457
457
tybounds ( f, typarams)
458
458
}
459
459
clean:: Infer => write ! ( f, "_" ) ,
460
- clean:: Primitive ( prim) => primitive_link ( f, prim, prim. to_string ( ) ) ,
460
+ clean:: Primitive ( prim) => primitive_link ( f, prim, prim. as_str ( ) ) ,
461
461
clean:: BareFunction ( ref decl) => {
462
462
write ! ( f, "{}{}fn{}{}" ,
463
463
UnsafetySpace ( decl. unsafety) ,
You can’t perform that action at this time.
0 commit comments