Skip to content

Commit 6b525ec

Browse files
committed
Take string slices
1 parent 808aada commit 6b525ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libsyntax/print/pprust.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,10 +656,10 @@ pub fn visibility_to_str(vis: ast::visibility) -> ~str {
656656
}
657657
}
658658

659-
pub fn visibility_qualified(vis: ast::visibility, s: ~str) -> ~str {
659+
pub fn visibility_qualified(vis: ast::visibility, s: &str) -> ~str {
660660
match vis {
661661
ast::private | ast::public => visibility_to_str(vis) + " " + s,
662-
ast::inherited => copy s
662+
ast::inherited => s.to_owned()
663663
}
664664
}
665665

0 commit comments

Comments
 (0)