Change to_str().to_string() to just to_str()

This commit is contained in:
Adolfo Ochagavía
2014-06-05 09:15:19 +02:00
parent 073c8f10fc
commit 501b904bb7
31 changed files with 54 additions and 51 deletions

View File

@@ -611,7 +611,7 @@ fn parse(cx: &mut ExtCtxt, tts: &[ast::TokenTree]) -> Option<String> {
let regex = match entry.node {
ast::ExprLit(lit) => {
match lit.node {
ast::LitStr(ref s, _) => s.to_str().to_string(),
ast::LitStr(ref s, _) => s.to_str(),
_ => {
cx.span_err(entry.span, format!(
"expected string literal but got `{}`",