Fix typos

This commit is contained in:
practicalswift 2019-08-04 19:27:36 +00:00
parent 2e915bf7ef
commit 8152ed758c
4 changed files with 8 additions and 8 deletions

View File

@ -273,7 +273,7 @@ pub mod all {
pub const OP_2SWAP: All = All {code: 0x72};
/// Duplicate the top stack element unless it is zero
pub const OP_IFDUP: All = All {code: 0x73};
/// Push the current number of stack items onto te stack
/// Push the current number of stack items onto the stack
pub const OP_DEPTH: All = All {code: 0x74};
/// Drops the top stack item
pub const OP_DROP: All = All {code: 0x75};

View File

@ -158,7 +158,7 @@ fn parse_signed_to_satoshi(
// If precision diff is negative, this means we are parsing
// into a less precise amount. That is not allowed unless
// there are no decimals and the last digits are zeroes as
// many as the diffence in precision.
// many as the difference in precision.
let last_n = precision_diff.abs() as usize;
if s.contains(".") || s.chars().rev().take(last_n).any(|d| d != '0') {
return Err(ParseAmountError::TooPrecise);
@ -252,7 +252,7 @@ fn fmt_satoshi_in(
/// Amount
///
/// The [Amount] type can be used to express Bitcoin amounts that supports
/// arithmetic and convertion to various denominations.
/// arithmetic and conversion to various denominations.
///
///
/// Warning!
@ -387,7 +387,7 @@ impl Amount {
buf
}
// Some arithmethic that doesn't fit in `std::ops` traits.
// Some arithmetic that doesn't fit in `std::ops` traits.
/// Checked addition.
/// Returns [None] if overflow occurred.
@ -552,7 +552,7 @@ impl FromStr for Amount {
/// SignedAmount
///
/// The [SignedAmount] type can be used to express Bitcoin amounts that supports
/// arithmetic and convertion to various denominations.
/// arithmetic and conversion to various denominations.
///
///
/// Warning!
@ -684,7 +684,7 @@ impl SignedAmount {
buf
}
// Some arithmethic that doesn't fit in `std::ops` traits.
// Some arithmetic that doesn't fit in `std::ops` traits.
/// Get the absolute value of this [SignedAmount].
pub fn abs(self) -> SignedAmount {

View File

@ -436,7 +436,7 @@ impl GCSFilter {
return Ok((q << self.p) + r);
}
/// Hash an arbitary slice with siphash using parameters of this filter
/// Hash an arbitrary slice with siphash using parameters of this filter
fn hash(&self, element: &[u8]) -> u64 {
siphash24::Hash::hash_to_u64_with_keys(self.k0, self.k1, element)
}

View File

@ -749,7 +749,7 @@ mod tests {
}
#[test]
fn test_derivation_path_convertion_index() {
fn test_derivation_path_conversion_index() {
let path = DerivationPath::from_str("m/0h/1/2'").unwrap();
let numbers: Vec<ChildNumber> = path.clone().into();
let path2: DerivationPath = numbers.into();