wrap u8 and LeafVersion in backticks and square bracket in doc

This commit is contained in:
KaFai Choi 2022-01-10 15:09:44 +07:00
parent d82afc6ef5
commit 9835736ef5
No known key found for this signature in database
GPG Key ID: C93944C459E21542
2 changed files with 2 additions and 2 deletions

View File

@ -276,7 +276,7 @@ impl SchnorrSigHashType {
} }
} }
/// Create a [`SchnorrSigHashType`] from raw u8 /// Create a [`SchnorrSigHashType`] from raw `u8`
pub fn from_u8(hash_ty: u8) -> Result<Self, Error> { pub fn from_u8(hash_ty: u8) -> Result<Self, Error> {
match hash_ty { match hash_ty {
0x00 => Ok(SchnorrSigHashType::Default), 0x00 => Ok(SchnorrSigHashType::Default),

View File

@ -762,7 +762,7 @@ impl ControlBlock {
/// Inner type representing future (non-tapscript) leaf versions. See [`LeafVersion::Future`]. /// Inner type representing future (non-tapscript) leaf versions. See [`LeafVersion::Future`].
/// ///
/// NB: NO PUBLIC CONSTRUCTOR! /// NB: NO PUBLIC CONSTRUCTOR!
/// The only way to construct this is by converting u8 to LeafVersion and then extracting it. /// The only way to construct this is by converting `u8` to [`LeafVersion`] and then extracting it.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct FutureLeafVersion(u8); pub struct FutureLeafVersion(u8);