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 a2a315d46d
commit 33e2d226a1

View file

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