1
0
Fork 0
mirror of https://codeberg.org/demostf/sync.git synced 2026-06-03 16:44:07 +02:00
This commit is contained in:
Robin Appelman 2025-05-10 14:41:32 +02:00
commit ca922a4146
5 changed files with 142 additions and 809 deletions

902
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -5,21 +5,14 @@ authors = ["Robin Appelman <robin@icewind.nl>"]
edition = "2021"
[dependencies]
tokio = { version = "1.41.1", features = ["rt-multi-thread", "macros", "sync"] }
tokio-tungstenite = "0.24.0"
tokio = { version = "1.45.0", features = ["rt-multi-thread", "macros", "sync"] }
tokio-tungstenite = "0.26.2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
dashmap = "6.1.0"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
main_error = "0.1.2"
futures-channel = "0.3.31"
log = "0.4.22"
futures-util = "0.3.31"
real-ip = "0.1.0"
[dev-dependencies]
maplit = "1"
portpicker = "0.1"
websocket-lite = "0.5"
better-panic = "0.3"

32
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": {
"crane": {
"locked": {
"lastModified": 1730060262,
"narHash": "sha256-RMgSVkZ9H03sxC+Vh4jxtLTCzSjPq18UWpiM0gq6shQ=",
"lastModified": 1742394900,
"narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
"owner": "ipetkov",
"repo": "crane",
"rev": "498d9f122c413ee1154e8131ace5a35a80d8fa76",
"rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
]
},
"locked": {
"lastModified": 1731933812,
"narHash": "sha256-PeuRDDq1DcHxbOmXWb3nWMp5PqWUn5PSKimNbUzWEaQ=",
"lastModified": 1746449252,
"narHash": "sha256-dFGAaYhaaDTfh08wetspJXt6KedYZwsfFpxZ68k9Qds=",
"owner": "nix-community",
"repo": "flakelight",
"rev": "f4b26f683be5c9ac1ec05f968dbbcb35f4bb6346",
"rev": "d156dc871b3cdbe0b52169c4bc5171377a9bd6e0",
"type": "github"
},
"original": {
@ -44,11 +44,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1732306573,
"narHash": "sha256-wE12kIIE0qb9V9y0JiVm5RsRrMNX+KeeMwkzwefdHhY=",
"lastModified": 1746388890,
"narHash": "sha256-2QIoaGxC4yDazYfgnK+lprmA2PQ6Mb1QLro7fvyj2cM=",
"owner": "icewind1991",
"repo": "mill-scale",
"rev": "8b4cbf174a9728d7e58bbfde5b5a6685dcbf1015",
"rev": "e7b07da5c0a5639acf308dc89ce729e73feb5129",
"type": "github"
},
"original": {
@ -59,16 +59,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1731797254,
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
"lastModified": 1746557022,
"narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
"rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"ref": "nixos-24.11",
"type": "indirect"
}
},
@ -88,11 +88,11 @@
]
},
"locked": {
"lastModified": 1731897198,
"narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
"lastModified": 1742697269,
"narHash": "sha256-Lpp0XyAtIl1oGJzNmTiTGLhTkcUjwSkEb0gOiNzYFGM=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
"rev": "01973c84732f9275c50c5f075dd1f54cc04b3316",
"type": "github"
},
"original": {

View file

@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs.url = "nixpkgs/nixos-24.11";
flakelight = {
url = "github:nix-community/flakelight";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -66,7 +66,7 @@ impl Server {
fn send_text<S: Into<String>>(&self, peer: &PeerId, text: S) {
if let Some(mut tx) = self.peers.get_mut(peer) {
if let Err(e) = tx.try_send(Message::Text(text.into())) {
if let Err(e) = tx.try_send(Message::Text(text.into().into())) {
error!(%peer, ?e, "failed to send message to client")
}
}