diff --git a/libs/sdk-core/src/models.rs b/libs/sdk-core/src/models.rs index 2b4531012..2e6bf4039 100644 --- a/libs/sdk-core/src/models.rs +++ b/libs/sdk-core/src/models.rs @@ -1590,14 +1590,14 @@ pub(crate) mod sanitize { use crate::{FullReverseSwapInfo, SwapInfo}; - pub(crate) trait Sanitize { - /// Sanitizes a raw struct [T] to a clone of itself where sensitive fields are blanked - fn sanitize(self) -> T; + pub(crate) trait Sanitize { + /// Sanitizes a raw struct to a clone of itself where sensitive fields are blanked + fn sanitize(self) -> Self; } pub(crate) fn sanitize_vec(vals: Vec) -> Vec where - T: Sanitize, + T: Sanitize, { vals.into_iter() .map(|val| val.sanitize()) @@ -1606,12 +1606,12 @@ pub(crate) mod sanitize { pub(crate) fn sanitize_vec_pretty_print(vals: Vec) -> Result where - T: Sanitize + Serialize, + T: Sanitize + Serialize, { serde_json::to_string_pretty(&sanitize_vec(vals)).map_err(anyhow::Error::new) } - impl Sanitize for FullReverseSwapInfo { + impl Sanitize for FullReverseSwapInfo { fn sanitize(self) -> FullReverseSwapInfo { FullReverseSwapInfo { preimage: vec![], @@ -1621,7 +1621,7 @@ pub(crate) mod sanitize { } } - impl Sanitize for SwapInfo { + impl Sanitize for SwapInfo { fn sanitize(self) -> SwapInfo { SwapInfo { preimage: vec![],