Skip to content

Comments

The file is updated#15

Open
shitcodebykaushik wants to merge 5 commits intoigumnoff:mainfrom
shitcodebykaushik:broacdcast
Open

The file is updated#15
shitcodebykaushik wants to merge 5 commits intoigumnoff:mainfrom
shitcodebykaushik:broacdcast

Conversation

@shitcodebykaushik
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

@shitcodebykaushik shitcodebykaushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The src broadcast file has been updated.

@@ -1,9 +1,8 @@
use std::future::Future;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

igumn@lenovo MINGW64 ~/gabriel2 (shitcodebykaushik-broacdcast)
$ cargo test
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
   Compiling gabriel2 v1.4.3 (C:\Users\igumn\gabriel2\lib)
error[E0252]: the name `DashMap` is defined multiple times
  --> lib\src\broadcast.rs:18:5
   |
3  | use dashmap::DashMap;
   |     ---------------- previous import of the type `DashMap` here
...
18 | use dashmap::DashMap;
   |     ^^^^^^^^^^^^^^^^ `DashMap` reimported here
   |
   = note: `DashMap` must be defined only once in the type namespace of this module

warning: unused import: `dashmap::DashMap`
  --> lib\src\broadcast.rs:18:5
   |
18 | use dashmap::DashMap;
   |     ^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

error[E0308]: mismatched types
   --> lib\src\broadcast.rs:107:25
    |
107 |                     for (_id, callback) in subscribers {
    |                         ^^^^^^^^^^^^^^^    ----------- this is an iterator with items of type `dashmap::mapref::multiple::RefMulti<'_, usize, Pin<Box<(dyn EventCallback<E> + 'static)>>>`
    |                         |
    |                         expected `RefMulti<'_, usize, Pin<Box<dyn EventCallback<E>>>>`, found `(_, _)`
    |
    = note: expected struct `dashmap::mapref::multiple::RefMulti<'_, usize, Pin<Box<(dyn EventCallback<E> + 'static)>>>`
                found tuple `(_, _)`

Some errors have detailed explanations: E0252, E0308.
For more information about an error, try `rustc --explain E0252`.
warning: `gabriel2` (lib) generated 1 warning
error: could not compile `gabriel2` (lib) due to 2 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
warning: `gabriel2` (lib test) generated 1 warning (1 duplicate)
error: could not compile `gabriel2` (lib test) due to 2 previous errors; 1 warning emitted

bincode = { version = "2.0.0-rc.3", optional = true }
async-stream = "0.3.5"

dashmap = "6.0.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this dependency should be optional.
Only included for "broadcast" feature.

Check for example:

remote = ["tokio/net", "bincode"]

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants