From 6b525ecbda52bc890bdadf57e4c5b5ae10f47bd8 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Wed, 22 May 2013 02:32:29 +0900 Subject: [PATCH] Take string slices --- src/libsyntax/print/pprust.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index a535e5d195f2..3904d137faad 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -656,10 +656,10 @@ pub fn visibility_to_str(vis: ast::visibility) -> ~str { } } -pub fn visibility_qualified(vis: ast::visibility, s: ~str) -> ~str { +pub fn visibility_qualified(vis: ast::visibility, s: &str) -> ~str { match vis { ast::private | ast::public => visibility_to_str(vis) + " " + s, - ast::inherited => copy s + ast::inherited => s.to_owned() } }