Skip to content

error[E0599]: no method named filter found for struct nostr_gossip_memory::prelude::Tags in the current scope #1

Description

@Sakrecoer

First of all: thank you, this concept is amazing!

Unfortunately, i was unable to run it and i'm not a very experienced rust user. Everything is compiling fine until i reach huno v0.1.0 where i'm met with the following error message.

Compiling huno v0.1.0 (/home/set/git/huno)
error[E0599]: no method named `filter` found for struct `nostr_gossip_memory::prelude::Tags` in the current scope
   --> src/main.rs:210:39
    |
210 |             for tag in del_event.tags.filter(TagKind::e()) {
    |                                       ^^^^^^ `nostr_gossip_memory::prelude::Tags` is not an iterator
    |
help: call `.into_iter()` first
    |
210 |             for tag in del_event.tags.into_iter().filter(TagKind::e()) {
    |                                       ++++++++++++

error[E0433]: cannot find type `TagKind` in this scope
   --> src/main.rs:210:46
    |
210 |             for tag in del_event.tags.filter(TagKind::e()) {
    |                                              ^^^^^^^ use of undeclared type `TagKind`

error[E0599]: no method named `filter` found for struct `nostr_gossip_memory::prelude::Tags` in the current scope
   --> src/main.rs:228:39
    |
228 |             for tag in del_event.tags.filter(TagKind::a()) {
    |                                       ^^^^^^ `nostr_gossip_memory::prelude::Tags` is not an iterator
    |
help: call `.into_iter()` first
    |
228 |             for tag in del_event.tags.into_iter().filter(TagKind::a()) {
    |                                       ++++++++++++

error[E0433]: cannot find type `TagKind` in this scope
   --> src/main.rs:228:46
    |
228 |             for tag in del_event.tags.filter(TagKind::a()) {
    |                                              ^^^^^^^ use of undeclared type `TagKind`

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `huno` (bin "huno") due to 4 previous errors
error: failed to compile `huno v0.1.0 (/home/set/git/huno)`, intermediate artifacts can be found at `/home/set/git/huno/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_BUILD_BUILD_DIR` to that path.

Many thanks for your time and energy!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions