fn load_source(&self, loc: &DirectRes) -> Result<DirLock, Error> {
        if let Some(path) = self.check_source(loc) {
            DirLock::acquire(&path)
        } else {
            let p = self.layout.src.join(Self::get_source_dir(loc));

            let dir = DirLock::acquire(&p)?;
            loc.retrieve(&self.client, &dir)?;

            Ok(dir)
        }
    }
// TODO: In the future (heh), return Box<Future<Item = PathBuf, Error = Error>> and use async
// reqwest. For now, it seems like too much trouble for not that much gain.
// Info on async:
// https://stackoverflow.com/questions/49087958/getting-multiple-urls-concurrently-with-hyper
// Info on downloading things in general:
// https://rust-lang-nursery.github.io/rust-cookbook/web/clients/download.html
/// Returns a future pointing to the path to a downloaded (and potentially extracted, if it's a
/// tarball) package.
///
/// If the package has been cached, this function does no I/O. If it hasn't, it goes wherever
/// it needs to in order to retrieve the package.
In the future (heh), return Box> and use async
reqwest. For now, it seems like too much trouble for not that much gain.

If the package has been cached, this function does no I/O. If it hasn't, it goes wherever
it needs to in order to retrieve the package.
In the future ( heh ) return Box > and use async reqwest . For now it seems like too much trouble for not that much gain . If the package has been cached this function does no I / O . If it hasn ' t it goes wherever it needs to in order to retrieve the package .
fn load_source(&self, loc: &DirectRes) -> Result<DirLock, Error> {
        if let Some(path) = self.check_source(loc) {
            DirLock::acquire(&path)
        } else {
            let p = self.layout.src.join(Self::get_source_dir(loc));
            let dir = DirLock::acquire(&p)?;
            loc.retrieve(&self.client, &dir)?;
            Ok(dir)
        }
    }
fn load_source ( & self , loc : & DirectRes ) -> Result < DirLock , Error > { if let Some ( path ) = self . check_source ( loc ) { DirLock :: acquire ( & path ) } else { let p = self . layout . src . join ( Self :: get_source_dir ( loc ) ) ; let dir = DirLock :: acquire ( & p ) ? ; loc . retrieve ( & self . client , & dir ) ? ; Ok ( dir ) } }
TODO: In the future (heh), return Box<Future<Item = PathBuf, Error = Error>> and use async
reqwest.
TODO : In the future ( heh ) return Box<Future<Item = PathBuf Error = Error >> and use async reqwest .
&self
loc
&DirectRes