Skip to content

Commit f4f7a5d

Browse files
committed
Use links for error types
We can help the users by linking them to errors when mentioning them in the docs.
1 parent 790126e commit f4f7a5d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/util/taproot.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -704,11 +704,11 @@ impl ControlBlock {
704704
///
705705
/// # Errors
706706
///
707-
/// - `TaprootError::InvalidControlBlockSize` if `sl` is not of size 1 + 32 + 32N for any N >= 0.
708-
/// - `TaprootError::InvalidParity` if first byte of `sl` is not a valid output key parity.
709-
/// - `TaprootError::InvalidTaprootLeafVersion` if first byte of `sl` is not a valid leaf version.
710-
/// - `TaprootError::InvalidInternalKey` if internal key is invalid (first 32 bytes after the parity byte).
711-
/// - `TaprootError::InvalidMerkleTreeDepth` if merkle tree is too deep (more than 128 levels).
707+
/// - [`TaprootError::InvalidControlBlockSize`] if `sl` is not of size 1 + 32 + 32N for any N >= 0.
708+
/// - [`TaprootError::InvalidParity`] if first byte of `sl` is not a valid output key parity.
709+
/// - [`TaprootError::InvalidTaprootLeafVersion`] if first byte of `sl` is not a valid leaf version.
710+
/// - [`TaprootError::InvalidInternalKey`] if internal key is invalid (first 32 bytes after the parity byte).
711+
/// - [`TaprootError::InvalidMerkleTreeDepth`] if merkle tree is too deep (more than 128 levels).
712712
pub fn from_slice(sl: &[u8]) -> Result<ControlBlock, TaprootError> {
713713
if sl.len() < TAPROOT_CONTROL_BASE_SIZE
714714
|| (sl.len() - TAPROOT_CONTROL_BASE_SIZE) % TAPROOT_CONTROL_NODE_SIZE != 0

0 commit comments

Comments
 (0)