Closed edilmedeiros closed 6 months ago
I made no changes to the text about it, but I'm getting a warning at this point.
warning: fields `txid`, `output_index`, `script_sig`, and `sequence` are never read
--> src/main.rs:5:5
|
4 | struct Input {
| ----- fields in this struct
5 | txid: [u8; 32],
| ^^^^
6 | output_index: u32,
| ^^^^^^^^^^^^
7 | script_sig: Vec<u8>,
| ^^^^^^^^^^
8 | sequence: u32,
| ^^^^^^^^
|
= note: `Input` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: `transaction-decoder` (bin "transaction-decoder") generated 1 warning
Yeah probably worth mentioning that the compiler will give warning messages at this point since we're not doing anything with the struct yet.
I added a #[allow(dead_code)]
annotation together with explanation about it.
Also dropped the commit renaming the script
variable (see #39).
Ack 2ce24694b2720458cec1f0d7bf4d27cf3b881ddf This is perfect, thank you!
Please take a separate look at these commits:
950b6fef4cec58e1bab700d718559d96548105e7: following #34 renaming, so it is consistent here. Will probably be necessary in the whole text going forward...
57400aba39cd863137125a4205179d8d6a71c495: I could not compile without it since we are pusshing into the vector, which requires it to be declared
mut
.