Take string slices
This commit is contained in:
parent
808aada1fb
commit
6b525ecbda
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue