Fix typos in docs

See #828
This commit is contained in:
Daniela Brozzoni 2022-12-19 09:32:52 +01:00
parent 0203107360
commit 4a6a12011d
No known key found for this signature in database
GPG Key ID: 7DE4F1FDCED0AB87
4 changed files with 9 additions and 9 deletions

View File

@ -458,7 +458,7 @@ fn fmt_satoshi_in(
/// Amount
///
/// The [Amount] type can be used to express Bitcoin amounts that supports
/// The [Amount] type can be used to express Bitcoin amounts that support
/// arithmetic and conversion to various denominations.
///
///
@ -802,7 +802,7 @@ enum DisplayStyle {
/// SignedAmount
///
/// The [SignedAmount] type can be used to express Bitcoin amounts that supports
/// The [SignedAmount] type can be used to express Bitcoin amounts that support
/// arithmetic and conversion to various denominations.
///
///

View File

@ -253,7 +253,7 @@ impl TxIn {
/// might increase more than `TxIn::segwit_weight`. This happens when:
/// - the new input added causes the input length `VarInt` to increase its encoding length
/// - the new input is the first segwit input added - this will add an additional 2WU to the
/// transaction weight to take into account the segwit marker
/// transaction weight to take into account the segwit marker
pub fn segwit_weight(&self) -> usize {
self.legacy_weight() + self.witness.serialized_len()
}

View File

@ -159,7 +159,7 @@ pub trait WriteExt : io::Write {
fn emit_u32(&mut self, v: u32) -> Result<(), io::Error>;
/// Outputs a 16-bit unsigned integer.
fn emit_u16(&mut self, v: u16) -> Result<(), io::Error>;
/// Outputs a 8-bit unsigned integer.
/// Outputs an 8-bit unsigned integer.
fn emit_u8(&mut self, v: u8) -> Result<(), io::Error>;
/// Outputs a 64-bit signed integer.
@ -168,7 +168,7 @@ pub trait WriteExt : io::Write {
fn emit_i32(&mut self, v: i32) -> Result<(), io::Error>;
/// Outputs a 16-bit signed integer.
fn emit_i16(&mut self, v: i16) -> Result<(), io::Error>;
/// Outputs a 8-bit signed integer.
/// Outputs an 8-bit signed integer.
fn emit_i8(&mut self, v: i8) -> Result<(), io::Error>;
/// Outputs a boolean.
@ -186,7 +186,7 @@ pub trait ReadExt : io::Read {
fn read_u32(&mut self) -> Result<u32, Error>;
/// Reads a 16-bit unsigned integer.
fn read_u16(&mut self) -> Result<u16, Error>;
/// Reads a 8-bit unsigned integer.
/// Reads an 8-bit unsigned integer.
fn read_u8(&mut self) -> Result<u8, Error>;
/// Reads a 64-bit signed integer.
@ -195,7 +195,7 @@ pub trait ReadExt : io::Read {
fn read_i32(&mut self) -> Result<i32, Error>;
/// Reads a 16-bit signed integer.
fn read_i16(&mut self) -> Result<i16, Error>;
/// Reads a 8-bit signed integer.
/// Reads an 8-bit signed integer.
fn read_i8(&mut self) -> Result<i8, Error>;
/// Reads a boolean.

View File

@ -38,14 +38,14 @@ pub const MAX_MSG_SIZE: usize = 5_000_000;
pub struct CommandString(Cow<'static, str>);
impl CommandString {
/// Convert `&'static str` to `CommandString`
/// Converts `&'static str` to `CommandString`
///
/// This is more efficient for string literals than non-static conversions because it avoids
/// allocation.
///
/// # Errors
///
/// Returns an error if and only if the string is
/// Returns an error if, and only if, the string is
/// larger than 12 characters in length.
pub fn try_from_static(s: &'static str) -> Result<CommandString, CommandStringError> {
Self::try_from_static_cow(s.into())