diff options
| author | Corey Farwell <coreyf@rwell.org> | 2016-10-01 11:15:42 -0400 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2016-10-02 21:58:19 -0400 |
| commit | 0d0f1b4690027d32eddf6c2adfa2e089d1d5d3a0 (patch) | |
| tree | e81da0a39e2cac2119dd38932e287ba4ad3fd844 | |
| parent | c3bc905e5fd15f01e121ec4dbb1b990dd94fc346 (diff) | |
| download | rust-0d0f1b4690027d32eddf6c2adfa2e089d1d5d3a0.tar.gz rust-0d0f1b4690027d32eddf6c2adfa2e089d1d5d3a0.zip | |
Rename method 'to_string' to match conventions.
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/format.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index b95ca278707..7cde1a9907e 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -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. diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index adcdc7aaab4..1b5ac24d86d 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -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), |
