Skip to content

Commit

Permalink
H-3377: Track caller when using ReportSink (#5273)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDiekmann authored Sep 28, 2024
1 parent bd49aeb commit f5e7345
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/error-stack/src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ impl<C> ReportSink<C> {
/// "I/O error",
/// )));
/// ```
#[track_caller]
pub fn append(&mut self, report: impl Into<Report<[C]>>) {
let report = report.into();

Expand All @@ -206,6 +207,7 @@ impl<C> ReportSink<C> {
/// ```
///
/// [`append`]: ReportSink::append
#[track_caller]
pub fn capture(&mut self, error: impl Into<Report<C>>) {
let report = error.into();

Expand Down Expand Up @@ -243,6 +245,7 @@ impl<C> ReportSink<C> {
/// // Any errors are now collected in the sink
/// # let _result = sink.finish();
/// ```
#[track_caller]
pub fn attempt<T, R>(&mut self, result: Result<T, R>) -> Option<T>
where
R: Into<Report<C>>,
Expand Down

0 comments on commit f5e7345

Please sign in to comment.