Skip to content

Commit

Permalink
Auto merge of rust-lang#4345 - froydnj:use-noop-more, r=alexcrichton
Browse files Browse the repository at this point in the history
use Work::noop() more

Using Work::noop() in these places is clearer.
  • Loading branch information
bors committed Jul 31, 2017
2 parents fbd2842 + 5207140 commit b1df578
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_rustc/custom_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub fn prepare<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>)
unit.pkg, unit.target.name()));
let overridden = cx.build_state.has_override(unit);
let (work_dirty, work_fresh) = if overridden {
(Work::new(|_| Ok(())), Work::new(|_| Ok(())))
(Work::noop(), Work::noop())
} else {
build_work(cx, unit)?
};
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_rustc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fn compile<'a, 'cfg: 'a>(cx: &mut Context<'a, 'cfg>,
custom_build::prepare(cx, unit)?
} else if unit.profile.doc && unit.profile.test {
// we run these targets later, so this is just a noop for now
(Work::new(|_| Ok(())), Work::new(|_| Ok(())), Freshness::Fresh)
(Work::noop(), Work::noop(), Freshness::Fresh)
} else {
let (mut freshness, dirty, fresh) = fingerprint::prepare_target(cx, unit)?;
let work = if unit.profile.doc {
Expand Down

0 comments on commit b1df578

Please sign in to comment.