Put helper function below where its called

Reading the code is arguably easier if we have seen the call site before
seeing the function, saves having to think what the function does.
This commit is contained in:
Tobin C. Harding 2022-11-14 08:38:22 +11:00
parent 5076579fb9
commit 83c2a552db
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 4 additions and 4 deletions

View File

@ -509,10 +509,6 @@ mod tests {
use crate::internal_macros::hex;
use crate::{Block, Txid};
/// accepts `pmt_test_$num`
#[cfg(feature = "rand-std")]
fn pmt_test_from_name(name: &str) { pmt_test(name[9..].parse().unwrap()) }
#[cfg(feature = "rand-std")]
macro_rules! pmt_tests {
($($name:ident),* $(,)?) => {
@ -541,6 +537,10 @@ mod tests {
pmt_test_4095
);
/// Parses the transaction count out of `name` with form: `pmt_test_$num`.
#[cfg(feature = "rand-std")]
fn pmt_test_from_name(name: &str) { pmt_test(name[9..].parse().unwrap()) }
#[cfg(feature = "rand-std")]
fn pmt_test(tx_count: usize) {
use core::cmp::min;