rustc_metadata: Use CrateSource where appropriate
This commit is contained in:
parent
e8c28e24b9
commit
b476f2fa4e
3 changed files with 43 additions and 67 deletions
|
|
@ -32,6 +32,12 @@ pub struct CrateSource {
|
|||
pub rmeta: Option<(PathBuf, PathKind)>,
|
||||
}
|
||||
|
||||
impl CrateSource {
|
||||
pub fn paths(&self) -> impl Iterator<Item = &PathBuf> {
|
||||
self.dylib.iter().chain(self.rlib.iter()).chain(self.rmeta.iter()).map(|p| &p.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(RustcEncodable, RustcDecodable, Copy, Clone,
|
||||
Ord, PartialOrd, Eq, PartialEq, Debug, HashStable)]
|
||||
pub enum DepKind {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue