Skip to content

Commit

Permalink
adapt to changes in gix-trace
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jun 17, 2023
1 parent aa9dc8f commit bd6e3d7
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,8 @@ pub mod pretty {
let mut out = Vec::<u8>::new();
let mut err = Vec::<u8>::new();

let span = gix::trace::coarse!("run");
let res = run(progress::DoOrDiscard::from(Some(sub_progress)), &mut out, &mut err);
#[cfg(feature = "tracing")]
drop(span);
let res = gix::trace::coarse!("run")
.into_scope(|| run(progress::DoOrDiscard::from(Some(sub_progress)), &mut out, &mut err));

handle.shutdown_and_wait();
std::io::Write::write_all(&mut stdout(), &out)?;
Expand Down Expand Up @@ -219,10 +217,9 @@ pub mod pretty {
// We might have something interesting to show, which would be hidden by the alternate screen if there is a progress TUI
// We know that the printing happens at the end, so this is fine.
let mut out = Vec::new();
let span = gix::trace::coarse!("run", name = name);
let res = run(progress::DoOrDiscard::from(Some(sub_progress)), &mut out, &mut stderr());
#[cfg(feature = "tracing")]
drop(span);
let res = gix::trace::coarse!("run", name = name).into_scope(|| {
run(progress::DoOrDiscard::from(Some(sub_progress)), &mut out, &mut stderr())
});
tx.send(Event::ComputationDone(res, out)).ok();
}
});
Expand Down

0 comments on commit bd6e3d7

Please sign in to comment.