I have the csvdump.rs code as:
impl EvaluatedTxOut {
#[inline]
fn as_csv(&self, txid: &str, index: usize) -> String {
let address = match self.script.address.clone() {
Some(address) => address,
None => {
debug!(target: "csvdump", "Unable to evaluate address for utxo in txid: {} ({})",
txid, self.script.pattern);
String::new()
}
};
// (@txid, indexOut, value, @scriptPubKey, address)
//format!("{};{};{};{};{}\n",
format!(
"{};\n",
//&txid,
//&index,
//&self.out.value,
//&utils::arr_to_hex(&self.out.script_pubkey),
&self.script.address
)
}
}
I get the following error:
Compiling rusty-blockparser v0.8.2 (C:\Users\allsc\Downloads\Compressed\rusty-blockparser-master\rusty-blockparser-master)
error[E0277]: `Option<std::string::String>` doesn't implement `std::fmt::Display`
--> src\callbacks\csvdump.rs:203:13
|
203 | &self.script.address)
| ^^^^^^^^^^^^^^^^^^^^ `Option<std::string::String>` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `Option<std::string::String>`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
warning: `rusty-blockparser` (bin "rusty-blockparser") generated 1 warning
error: could not compile `rusty-blockparser` due to previous error; 1 warning emitted
Can some one please help with this ?