Use PathBuf instead of String where applicable

This commit is contained in:
Oliver Schneider
2017-12-14 08:09:19 +01:00
parent 8954b16beb
commit d732da813b
48 changed files with 443 additions and 308 deletions

View File

@@ -1714,6 +1714,7 @@ mod tests {
use std::cell::RefCell;
use std::collections::HashSet;
use std::io;
use std::path::PathBuf;
use std::rc::Rc;
fn mk_sess(cm: Rc<CodeMap>) -> ParseSess {
@@ -1735,7 +1736,7 @@ mod tests {
sess: &'a ParseSess,
teststr: String)
-> StringReader<'a> {
let fm = cm.new_filemap("zebra.rs".to_string(), teststr);
let fm = cm.new_filemap(PathBuf::from("zebra.rs").into(), teststr);
StringReader::new(sess, fm)
}