Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
let mut tests = ~[];
let dirs = os::list_dir_path(&config.src_base);
for dirs.iter().advance |file| {
let file = (*file).clone();
let file = file.clone();
debug!("inspecting file %s", file.to_str());
if is_test(config, file) {
let t = do make_test(config, file) {
if is_test(config, &file) {
let t = do make_test(config, &file) {
match config.mode {
mode_codegen => make_metrics_test_closure(config, file),
_ => make_test_closure(config, file)
mode_codegen => make_metrics_test_closure(config, &file),
_ => make_test_closure(config, &file)
}
};
tests.push(t)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/filesearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub fn search<T>(filesearch: @FileSearch, pick: pick<T>) -> Option<T> {
let r = os::list_dir_path(lib_search_path);
for r.iter().advance |path| {
debug!("testing %s", path.to_str());
let maybe_picked = pick(*path);
let maybe_picked = pick(path);
if maybe_picked.is_some() {
debug!("picked %s", path.to_str());
rslt = maybe_picked;
Expand Down
4 changes: 2 additions & 2 deletions src/librustpkg/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@ fn frob_source_file(workspace: &Path, pkgid: &PkgId) {
}
match maybe_p {
Some(p) => {
let w = io::file_writer(*p, &[io::Append]);
let w = io::file_writer(p, &[io::Append]);
match w {
Err(s) => { let _ = cond.raise(((**p).clone(), fmt!("Bad path: %s", s))); }
Err(s) => { let _ = cond.raise((p.clone(), fmt!("Bad path: %s", s))); }
Ok(w) => w.write_line("")
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,8 @@ pub fn list_dir(p: &Path) -> ~[~str] {
*
* This version prepends each entry with the directory.
*/
pub fn list_dir_path(p: &Path) -> ~[~Path] {
list_dir(p).map(|f| ~p.push(*f))
pub fn list_dir_path(p: &Path) -> ~[Path] {
list_dir(p).map(|f| p.push(*f))
}

/// Removes a directory at the specified path, after removing
Expand Down