fn activate(cx: &mut Context,
            registry: &mut Registry,
            parent: Option<&Rc<Summary>>,
            candidate: Candidate,
            method: &Method)
            -> CargoResult<Option<DepsFrame>> {
    if let Some(parent) = parent {
        cx.resolve.graph.link(parent.package_id().clone(),
                              candidate.summary.package_id().clone());
    }

    if cx.flag_activated(&candidate.summary, method) {
        return Ok(None);
    }

    let candidate = match candidate.replace {
        Some(replace) => {
            cx.resolve.replacements.insert(candidate.summary.package_id().clone(),
                                           replace.package_id().clone());
            if cx.flag_activated(&replace, method) {
                return Ok(None);
            }
            trace!("activating {} (replacing {})", replace.package_id(),
                   candidate.summary.package_id());
            replace
        }
        None => {
            trace!("activating {}", candidate.summary.package_id());
            candidate.summary
        }
    };

    let deps = try!(cx.build_deps(registry, &candidate, method));

    Ok(Some(DepsFrame {
        parent: candidate,
        remaining_siblings: RcVecIter::new(deps),
    }))
}
/// Attempts to activate the summary `candidate` in the context `cx`.
///
/// This function will pull dependency summaries from the registry provided, and
/// the dependencies of the package will be determined by the `method` provided.
/// If `candidate` was activated, this function returns the dependency frame to
/// iterate through next.
Attempts to activate the summary `candidate` in the context `cx`.
This function will pull dependency summaries from the registry provided, and
the dependencies of the package will be determined by the `method` provided.
If `candidate` was activated, this function returns the dependency frame to
iterate through next.
Attempts to activate the summary ` candidate ` in the context ` cx ` . This function will pull dependency summaries from the registry provided and the dependencies of the package will be determined by the ` method ` provided . If ` candidate ` was activated this function returns the dependency frame to iterate through next .
fn activate(cx: &mut Context,
            registry: &mut Registry,
            parent: Option<&Rc<Summary>>,
            candidate: Candidate,
            method: &Method)
            -> CargoResult<Option<DepsFrame>> {
    if let Some(parent) = parent {
        cx.resolve.graph.link(parent.package_id().clone(),
                              candidate.summary.package_id().clone());
    }
    if cx.flag_activated(&candidate.summary, method) {
        return Ok(None);
    }
    let candidate = match candidate.replace {
        Some(replace) => {
            cx.resolve.replacements.insert(candidate.summary.package_id().clone(),
                                           replace.package_id().clone());
            if cx.flag_activated(&replace, method) {
                return Ok(None);
            }
            trace!("activating {} (replacing {})", replace.package_id(),
                   candidate.summary.package_id());
            replace
        }
        None => {
            trace!("activating {}", candidate.summary.package_id());
            candidate.summary
        }
    };
    let deps = try!(cx.build_deps(registry, &candidate, method));
    Ok(Some(DepsFrame {
        parent: candidate,
        remaining_siblings: RcVecIter::new(deps),
    }))
}
fn activate ( cx : & mut Context , registry : & mut Registry , parent : Option < & Rc < Summary > > , candidate : Candidate , method : & Method ) -> CargoResult < Option < DepsFrame > > { if let Some ( parent ) = parent { cx . resolve . graph . link ( parent . package_id ( ) . clone ( ) , candidate . summary . package_id ( ) . clone ( ) ) ; } if cx . flag_activated ( & candidate . summary , method ) { return Ok ( None ) ; } let candidate = match candidate . replace { Some ( replace ) => { cx . resolve . replacements . insert ( candidate . summary . package_id ( ) . clone ( ) , replace . package_id ( ) . clone ( ) ) ; if cx . flag_activated ( & replace , method ) { return Ok ( None ) ; } trace ! ( " " replace package_id ( ) candidate summary package_id ( ) ) ; replace } None => { trace ! ( " " candidate summary package_id ( ) ) ; candidate . summary } } ; let deps = try ! ( cx build_deps ( registry candidate method ) ) ; Ok ( Some ( DepsFrame { parent : candidate , remaining_siblings : RcVecIter :: new ( deps ) , } ) ) }
Attempts to activate the summary `candidate` in the context `cx`.
Attempts to activate the summary ` candidate ` in the context ` cx ` .
cx
&mut Context
registry
&mut Registry
parent
Option<&Rc<Summary>>
candidate
Candidate
method
&Method
cx
&mut Context
registry
&mut Registry
parent
Option<&Rc<Summary>>
candidate
Candidate
method
&Method