message: Trash RegistryBuilder, dead cfg(test) code
diff: @@ -605,73 +605,3 @@ fn lock(locked: &LockedMap, patches: &HashMap<Url, Vec<PackageId>>, summary: Sum
  dep
  })
  }
  -
  -#[cfg(test)]
  -pub mod test {
  - use core::{Dependency, Registry, Summary};
  - use util::CargoResult;
  -
  - pub struct RegistryBuilder {
  - summaries: Vec<Summary>,
  - overrides: Vec<Summary>,
  - }
  -
  - impl RegistryBuilder {
  - pub fn new() -> RegistryBuilder {
  - RegistryBuilder {
  - summaries: vec![],
  - overrides: vec![],
  - }
  - }
  -
  - pub fn summary(mut self, summary: Summary) -> RegistryBuilder {
  - self.summaries.push(summary);
  - self
  - }
  -
  - pub fn summaries(mut self, summaries: Vec<Summary>) -> RegistryBuilder {
  - self.summaries.extend(summaries.into_iter());
  - self
  - }
  -
  - pub fn add_override(mut self, summary: Summary) -> RegistryBuilder {
  - self.overrides.push(summary);
  - self
  - }
  -
  - pub fn overrides(mut self, summaries: Vec<Summary>) -> RegistryBuilder {
  - self.overrides.extend(summaries.into_iter());
  - self
  - }
  -
  - fn query_overrides(&self, dep: &Dependency) -> Vec<Summary> {
  - self.overrides
  - .iter()
  - .filter(|s| s.name() == dep.name())
  - .map(|s| s.clone())
  - .collect()
  - }
  - }
  -
  - impl Registry for RegistryBuilder {
  - fn query(&mut self, dep: &Dependency, f: &mut FnMut(Summary)) -> CargoResult<()> {
  - debug!("querying; dep={:?}", dep);
  -
  - let overrides = self.query_overrides(dep);
  -
  - if overrides.is_empty() {
  - for s in self.summaries.iter() {
  - if dep.matches(s) {
  - f(s.clone());
  - }
  - }
  - Ok(())
  - } else {
  - for s in overrides {
  - f(s);
  - }
  - Ok(())
  - }
  - }
  - }
  -}
  