actix: immediately stringify spantrace

This commit is contained in:
asonix 2022-12-13 23:39:39 -06:00
parent 3e2639670e
commit 356c801dac
2 changed files with 4 additions and 4 deletions

View file

@ -51,14 +51,14 @@ pub struct VerifyMiddleware<T, S>(S, bool, T);
#[error("Error verifying digest")]
#[doc(hidden)]
pub struct VerifyError {
context: SpanTrace,
context: String,
kind: VerifyErrorKind,
}
impl VerifyError {
fn new(span: &Span, kind: VerifyErrorKind) -> Self {
span.in_scope(|| VerifyError {
context: SpanTrace::capture(),
context: SpanTrace::capture().to_string(),
kind,
})
}

View file

@ -75,7 +75,7 @@ impl std::fmt::Display for HeaderKind {
#[derive(Clone)]
#[doc(hidden)]
pub struct VerifyError {
context: SpanTrace,
context: String,
kind: VerifyErrorKind,
}
@ -125,7 +125,7 @@ enum VerifyErrorKind {
impl VerifyError {
fn new(span: &Span, kind: VerifyErrorKind) -> Self {
span.in_scope(|| VerifyError {
context: SpanTrace::capture(),
context: SpanTrace::capture().to_string(),
kind,
})
}