mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-28 23:50:55 +03:00
use slab instead of reinventing the wheel (#112)
This commit is contained in:
committed by
GitHub
parent
279e582698
commit
3e96b42067
@@ -90,15 +90,13 @@ pub fn run() -> Result<()> {
|
||||
log::info!("client {handle} deactivated");
|
||||
}
|
||||
}
|
||||
FrontendEvent::Created(client) => {
|
||||
let handle = client.handle;
|
||||
FrontendEvent::Created(handle, client) => {
|
||||
let port = client.port;
|
||||
let pos = client.pos;
|
||||
let hostname = client.hostname.as_deref().unwrap_or("");
|
||||
log::info!("new client ({handle}): {hostname}:{port} - {pos}");
|
||||
}
|
||||
FrontendEvent::Updated(client) => {
|
||||
let handle = client.handle;
|
||||
FrontendEvent::Updated(handle, client) => {
|
||||
let port = client.port;
|
||||
let pos = client.pos;
|
||||
let hostname = client.hostname.as_deref().unwrap_or("");
|
||||
@@ -111,10 +109,10 @@ pub fn run() -> Result<()> {
|
||||
log::warn!("{e}");
|
||||
}
|
||||
FrontendEvent::Enumerate(clients) => {
|
||||
for (client, active) in clients.into_iter() {
|
||||
for (handle, client, active) in clients.into_iter() {
|
||||
log::info!(
|
||||
"client ({}) [{}]: active: {}, associated addresses: [{}]",
|
||||
client.handle,
|
||||
handle,
|
||||
client.hostname.as_deref().unwrap_or(""),
|
||||
if active { "yes" } else { "no" },
|
||||
client
|
||||
|
||||
Reference in New Issue
Block a user