Apply straightforward suggestions from code review

This commit is contained in:
Daira-Emma Hopwood 2024-04-18 01:12:13 +01:00 committed by GitHub
parent f28aa6b304
commit ea82dbeb64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -211,7 +211,7 @@ pub mod testing {
}
/// Generates an arbitrary Unified address containing receivers corresponding to the provided
/// set of typecodes.. The receivers of this address are ikely to not represent valid protocol
/// set of typecodes. The receivers of this address are likely to not represent valid protocol
/// receivers, and should only be used for testing parsing and/or encoding functions that do
/// not concern themselves with the validity of the underlying receivers.
pub fn arb_unified_address_for_typecodes(
@ -231,7 +231,7 @@ pub mod testing {
.collect::<Vec<_>>()
}
/// Generates an arbitrary Unified address. The receivers of this address are ikely to not
/// Generates an arbitrary Unified address. The receivers of this address are likely to not
/// represent valid protocol receivers, and should only be used for testing parsing and/or
/// encoding functions that do not concern themselves with the validity of the underlying
/// receivers.

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2017-2019 Electric Coin Company
Copyright (c) 2017-2024 Electric Coin Company
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -269,6 +269,8 @@ impl Receiver {
}
}
/// Returns whether or not this receiver corresponds to `addr`, or is contained
/// in `addr` when the latter is a Unified Address.
pub fn corresponds(&self, addr: &ZcashAddress) -> bool {
addr.matches_receiver(&match self {
#[cfg(feature = "orchard")]