move try_from doc to function level for better ide support

This commit is contained in:
Grzegorz Świrski 2025-04-16 09:50:20 +02:00 committed by Qyriad
parent b28a31f495
commit 68f0b2c9b2

View file

@ -211,13 +211,13 @@ impl From<SparseMerklePath> for MerklePath {
} }
} }
/// # Errors
///
/// This conversion returns [MerkleError::DepthTooBig] if the path length is greater than
/// [`SMT_MAX_DEPTH`].
impl TryFrom<MerklePath> for SparseMerklePath { impl TryFrom<MerklePath> for SparseMerklePath {
type Error = MerkleError; type Error = MerkleError;
/// # Errors
///
/// This conversion returns [MerkleError::DepthTooBig] if the path length is greater than
/// [`SMT_MAX_DEPTH`].
fn try_from(path: MerklePath) -> Result<Self, MerkleError> { fn try_from(path: MerklePath) -> Result<Self, MerkleError> {
SparseMerklePath::from_sized_iter(path) SparseMerklePath::from_sized_iter(path)
} }