Replace usage of String::from_str with String:from
This commit is contained in:
parent
2ff42435c2
commit
c160192f5f
29 changed files with 105 additions and 106 deletions
|
@ -335,8 +335,7 @@ fn resolved_path(w: &mut fmt::Formatter, did: ast::DefId, path: &clean::Path,
|
|||
if print_all {
|
||||
let amt = path.segments.len() - 1;
|
||||
match rel_root {
|
||||
Some(root) => {
|
||||
let mut root = String::from_str(&root);
|
||||
Some(mut root) => {
|
||||
for seg in &path.segments[..amt] {
|
||||
if "super" == seg.name || "self" == seg.name {
|
||||
try!(write!(w, "{}::", seg.name));
|
||||
|
|
|
@ -817,7 +817,7 @@ impl<'a> SourceCollector<'a> {
|
|||
|
||||
// Create the intermediate directories
|
||||
let mut cur = self.dst.clone();
|
||||
let mut root_path = String::from_str("../../");
|
||||
let mut root_path = String::from("../../");
|
||||
clean_srcpath(&self.cx.src_root, &p, false, |component| {
|
||||
cur.push(component);
|
||||
mkdir(&cur).unwrap();
|
||||
|
|
|
@ -145,7 +145,7 @@ impl TocBuilder {
|
|||
(0, &self.top_level)
|
||||
}
|
||||
Some(entry) => {
|
||||
sec_number = String::from_str(&entry.sec_number);
|
||||
sec_number = entry.sec_number.clone();
|
||||
sec_number.push_str(".");
|
||||
(entry.level, &entry.children)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue