mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Remove glob dependency
This commit is contained in:
parent
ee1a81a801
commit
e4ae1abb92
@ -8,7 +8,6 @@ extern crate term;
|
|||||||
extern crate url;
|
extern crate url;
|
||||||
extern crate serialize;
|
extern crate serialize;
|
||||||
extern crate semver;
|
extern crate semver;
|
||||||
extern crate glob;
|
|
||||||
extern crate toml;
|
extern crate toml;
|
||||||
|
|
||||||
#[phase(plugin, link)]
|
#[phase(plugin, link)]
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use serialize::Decodable;
|
use serialize::Decodable;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::str;
|
use std::str;
|
||||||
|
use std::io::fs;
|
||||||
use toml;
|
use toml;
|
||||||
|
|
||||||
use glob::glob;
|
|
||||||
use core::{SourceId, GitKind};
|
use core::{SourceId, GitKind};
|
||||||
use core::manifest::{LibKind, Lib, Profile};
|
use core::manifest::{LibKind, Lib, Profile};
|
||||||
use core::{Summary, Manifest, Target, Dependency, PackageId};
|
use core::{Summary, Manifest, Target, Dependency, PackageId};
|
||||||
@ -39,10 +39,11 @@ pub fn project_layout(root: &Path) -> Layout {
|
|||||||
bins.push(root.join("src/main.rs"));
|
bins.push(root.join("src/main.rs"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: glob takes a &str even though Paths may have non-UTF8 chars. This
|
fs::readdir(&root.join("src/bin"))
|
||||||
// seems like a bug in libglob
|
.map(|v| v.move_iter())
|
||||||
let found = glob(root.join("src/bin/*.rs").display().to_str().as_slice()).collect();
|
.map(|i| i.filter(|f| f.extension_str() == Some("rs")))
|
||||||
bins.push_all_move(found);
|
.map(|mut i| i.collect())
|
||||||
|
.map(|found| bins.push_all_move(found));
|
||||||
|
|
||||||
Layout {
|
Layout {
|
||||||
lib: lib,
|
lib: lib,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user