From 538db34e6028b89425a9d59e55d65d7ac6f1c556 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 10 Jan 2015 10:52:03 +0530 Subject: [PATCH] into_string() -> to_owned() (fix #27) --- src/misc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc.rs b/src/misc.rs index 763c78bf278..3fb88e431da 100644 --- a/src/misc.rs +++ b/src/misc.rs @@ -49,7 +49,7 @@ impl LintPass for MiscPass { } -declare_lint!(pub STR_TO_STRING, Warn, "Warn when a String could use into_string() instead of to_string()"); +declare_lint!(pub STR_TO_STRING, Warn, "Warn when a String could use to_owned() instead of to_string()"); #[allow(missing_copy_implementations)] pub struct StrToStringPass; @@ -64,7 +64,7 @@ impl LintPass for StrToStringPass { ast::ExprMethodCall(ref method, _, ref args) if method.node.as_str() == "to_string" && is_str(cx, &*args[0]) => { - cx.span_lint(STR_TO_STRING, expr.span, "str.into_string() is faster"); + cx.span_lint(STR_TO_STRING, expr.span, "str.to_owned() is faster"); }, _ => () }