Add caller location to context
This commit is contained in:
parent
bbc7df28d8
commit
2a58f55943
|
@ -18,11 +18,13 @@ struct HowInner {
|
|||
impl How {
|
||||
#[must_use]
|
||||
#[inline(never)]
|
||||
#[track_caller]
|
||||
pub fn new(context: impl IntoContext) -> Self {
|
||||
Self(Box::new(HowInner {
|
||||
classified: false,
|
||||
context: {
|
||||
let mut vec = Vec::with_capacity(4);
|
||||
vec.push(format!("At {}", std::panic::Location::caller()).into_context());
|
||||
vec.push(context.into_context());
|
||||
vec
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue