Compare commits
No commits in common. "6d33a8a4866e7a63af9c92042a3ce1dc8636007d" and "887fec557b111f606106d5248c36e66394cc593c" have entirely different histories.
6d33a8a486
...
887fec557b
19
Cargo.toml
19
Cargo.toml
@ -6,25 +6,6 @@ edition = "2021"
|
|||||||
[workspace]
|
[workspace]
|
||||||
members = [".", "server", "domain", "i18n","library", "macro"]
|
members = [".", "server", "domain", "i18n","library", "macro"]
|
||||||
|
|
||||||
# https://doc.rust-lang.org/cargo/reference/profiles.html
|
|
||||||
[prifile.release]
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
opt-level = "z"
|
|
||||||
|
|
||||||
[profile.dev]
|
|
||||||
opt-level = 0
|
|
||||||
debug = true
|
|
||||||
split-debuginfo = '...' # Platform-specific.
|
|
||||||
strip = "none"
|
|
||||||
debug-assertions = true
|
|
||||||
overflow-checks = true
|
|
||||||
lto = false
|
|
||||||
panic = 'unwind'
|
|
||||||
incremental = true
|
|
||||||
codegen-units = 256
|
|
||||||
rpath = false
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -88,11 +88,10 @@ pub async fn broadcast_message(msg: Message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// 发送定向消息
|
/// 发送定向消息
|
||||||
#[allow(dead_code)]
|
pub async fn send_message(msg: Message, accoudIds: Vec<String>) {
|
||||||
pub async fn send_message(msg: Message, accoud_ids: Vec<String>) {
|
|
||||||
for ele in WS_POOL.iter() {
|
for ele in WS_POOL.iter() {
|
||||||
let mut sender = ele.value().lock().await;
|
let mut sender = ele.value().lock().await;
|
||||||
if accoud_ids.contains(&ele.key().to_string()) {
|
if accoudIds.contains(&ele.key().to_string()) {
|
||||||
if let Err(err) = sender.send(msg.clone()).await {
|
if let Err(err) = sender.send(msg.clone()).await {
|
||||||
tracing::error!("Failed to send message: {:?}", err);
|
tracing::error!("Failed to send message: {:?}", err);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user