Closed hdlslm closed 1 year ago
ok i was able to "fix" error e0308 i removed .to_string from this line of code:
let message = format!("Hola, nostr! My public key is: {}", my_keys.public_key());
and added it to .public_key method in the authors:Some....line of code now i'm just getting the one error messeage:
error[E0063]: missing fields custom
and identifiers
in initializer of nostr_sdk::Filter
--> src/main.rs:28:22
|
28 | let filter = Filter {
| ^^^^^^ missing custom
and identifiers
adding identifiers: None, got rid of the identifiers portion of the error now i need to do something for the custom initializer bc it doesn't expect the same params. i'm thinking Some(HashMap::new()) or something still working on it lol
custom: Default::default(), ended up working so the entire line of code if anyone is interested is:
let filter = Filter {
ids: None,
authors: Some(vec![my_keys.public_key().to_string()]),
kinds: None,
events: None,
pubkeys: None,
hashtags: None,
references: None,
search: None,
since: None,
until: None,
limit: None,
identifiers: None,
custom: Default::default(),
};
my code compiles just fine following the tutorial except when i get to #better filtering i receive the following compile errors:
.to_string()
String
, foundXOnlyPublicKey
error[E0063]: missing fields
custom
andidentifiers
in initializer ofnostr_sdk::Filter
--> src/main.rs:28:18 | 28 | let filter = Filter { | ^^^^^^ missingcustom
andidentifiers