fn note_working_on(&mut self, config: &Config, key: &Key<'a>,
                       fresh: Freshness) -> CargoResult<()> {
        if (self.compiled.contains(key.pkg) && !key.profile.doc) ||
            (self.documented.contains(key.pkg) && key.profile.doc) {
            return Ok(())
        }

        match fresh {
            // Any dirty stage which runs at least one command gets printed as
            // being a compiled package
            Dirty => {
                if key.profile.doc {
                    self.documented.insert(key.pkg);
                    try!(config.shell().status("Documenting", key.pkg));
                } else {
                    self.compiled.insert(key.pkg);
                    try!(config.shell().status("Compiling", key.pkg));
                }
            }
            Fresh if self.counts[key.pkg] == 0 => {
                self.compiled.insert(key.pkg);
                try!(config.shell().verbose(|c| c.status("Fresh", key.pkg)));
            }
            Fresh => {}
        }
        Ok(())
    }
// This isn't super trivial because we don't want to print loads and
// loads of information to the console, but we also want to produce a
// faithful representation of what's happening. This is somewhat nuanced
// as a package can start compiling *very* early on because of custom
// build commands and such.
//
// In general, we try to print "Compiling" for the first nontrivial task
// run for a package, regardless of when that is. We then don't print
// out any more information for a package after we've printed it once.
This isn't super trivial because we don't want to print loads and
loads of information to the console, but we also want to produce a
faithful representation of what's happening. This is somewhat nuanced
as a package can start compiling *very* early on because of custom
build commands and such.

In general, we try to print "Compiling" for the first nontrivial task
run for a package, regardless of when that is. We then don't print
out any more information for a package after we've printed it once.
This isn ' t super trivial because we don ' t want to print loads and loads of information to the console but we also want to produce a faithful representation of what ' s happening . This is somewhat nuanced as a package can start compiling * very * early on because of custom build commands and such . In general we try to print " Compiling " for the first nontrivial task run for a package regardless of when that is . We then don ' t print out any more information for a package after we ' ve printed it once .
fn note_working_on(&mut self, config: &Config, key: &Key<'a>,
                       fresh: Freshness) -> CargoResult<()> {
        if (self.compiled.contains(key.pkg) && !key.profile.doc) ||
            (self.documented.contains(key.pkg) && key.profile.doc) {
            return Ok(())
        }
        match fresh {
            // Any dirty stage which runs at least one command gets printed as
            // being a compiled package
            Dirty => {
                if key.profile.doc {
                    self.documented.insert(key.pkg);
                    try!(config.shell().status("Documenting", key.pkg));
                } else {
                    self.compiled.insert(key.pkg);
                    try!(config.shell().status("Compiling", key.pkg));
                }
            }
            Fresh if self.counts[key.pkg] == 0 => {
                self.compiled.insert(key.pkg);
                try!(config.shell().verbose(|c| c.status("Fresh", key.pkg)));
            }
            Fresh => {}
        }
        Ok(())
    }
fn note_working_on ( & mut self , config : & Config , key : & Key < ' a > , fresh : Freshness ) -> CargoResult < ( ) > { if ( self . compiled . contains ( key . pkg ) && ! key . profile . doc ) || ( self . documented . contains ( key . pkg ) && key . profile . doc ) { return Ok ( ( ) ) } match fresh { // Any dirty stage which runs at least one command gets printed as // being a compiled package Dirty => { if key . profile . doc { self . documented . insert ( key . pkg ) ; try ! ( config shell ( ) status ( " " key pkg ) ) ; } else { self . compiled . insert ( key . pkg ) ; try ! ( config shell ( ) status ( " " key pkg ) ) ; } } Fresh if self . counts [ key . pkg ] == 0 => { self . compiled . insert ( key . pkg ) ; try ! ( config shell ( ) verbose ( c c status ( " " key pkg ) ) ) ; } Fresh => { } } Ok ( ( ) ) }
This isn't super trivial because we don't want to print loads and
loads of information to the console, but we also want to produce a
faithful representation of what's happening.
This isn ' t super trivial because we don ' t want to print loads and loads of information to the console but we also want to produce a faithful representation of what ' s happening .
&mut self
config
&Config
key
&Key<'a>
fresh
Freshness
&mut self
config
&Config
key
&Key<'a>
fresh
Freshness