Add some #[track_caller]

This commit is contained in:
Michael Pfaff 2023-01-26 20:51:33 -05:00
parent 2a58f55943
commit 60df0085b8
Signed by: michael
GPG Key ID: CF402C4A012AA9D4
1 changed files with 4 additions and 0 deletions

View File

@ -20,8 +20,10 @@ where
type T = T;
#[inline(always)]
#[track_caller]
fn into_result_how(self) -> Result<Self::T, How> {
#[inline(never)]
#[track_caller]
fn into<E: std::error::Error>(e: E) -> How {
How::new(e.to_string())
}
@ -42,8 +44,10 @@ impl<T> IntoResultHow for Option<T> {
type T = T;
#[inline(always)]
#[track_caller]
fn into_result_how(self) -> Result<Self::T, How> {
#[inline(never)]
#[track_caller]
fn into() -> How {
How::new("Option::None")
}