Apply straightforward suggestions from code review
This commit is contained in:
parent
f28aa6b304
commit
ea82dbeb64
|
@ -211,7 +211,7 @@ pub mod testing {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Generates an arbitrary Unified address containing receivers corresponding to the provided
|
/// 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
|
/// 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.
|
/// not concern themselves with the validity of the underlying receivers.
|
||||||
pub fn arb_unified_address_for_typecodes(
|
pub fn arb_unified_address_for_typecodes(
|
||||||
|
@ -231,7 +231,7 @@ pub mod testing {
|
||||||
.collect::<Vec<_>>()
|
.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
|
/// 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
|
/// encoding functions that do not concern themselves with the validity of the underlying
|
||||||
/// receivers.
|
/// receivers.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -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 {
|
pub fn corresponds(&self, addr: &ZcashAddress) -> bool {
|
||||||
addr.matches_receiver(&match self {
|
addr.matches_receiver(&match self {
|
||||||
#[cfg(feature = "orchard")]
|
#[cfg(feature = "orchard")]
|
||||||
|
|
Loading…
Reference in New Issue