Rename method 'to_string' to match conventions.
This commit is contained in:
parent
c3bc905e5f
commit
0d0f1b4690
2 changed files with 3 additions and 3 deletions
|
|
@ -1571,7 +1571,7 @@ impl PrimitiveType {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn to_string(&self) -> &'static str {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match *self {
|
||||
PrimitiveType::Isize => "isize",
|
||||
PrimitiveType::I8 => "i8",
|
||||
|
|
@ -1596,7 +1596,7 @@ impl PrimitiveType {
|
|||
}
|
||||
|
||||
pub fn to_url_str(&self) -> &'static str {
|
||||
self.to_string()
|
||||
self.as_str()
|
||||
}
|
||||
|
||||
/// Creates a rustdoc-specific node id for primitive types.
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ impl fmt::Display for clean::Type {
|
|||
tybounds(f, typarams)
|
||||
}
|
||||
clean::Infer => write!(f, "_"),
|
||||
clean::Primitive(prim) => primitive_link(f, prim, prim.to_string()),
|
||||
clean::Primitive(prim) => primitive_link(f, prim, prim.as_str()),
|
||||
clean::BareFunction(ref decl) => {
|
||||
write!(f, "{}{}fn{}{}",
|
||||
UnsafetySpace(decl.unsafety),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue