From f36eb301ce17be64c9afd12ff5e47fcbc2905e10 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Fri, 23 Sep 2022 23:05:23 -0500 Subject: [PATCH] server: fix clippy nit in linux-only code --- server/src/main.rs | 2 +- server/src/test.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main.rs b/server/src/main.rs index bc16751..3f6eea6 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -641,7 +641,7 @@ async fn serve( /// See https://github.com/tonarino/innernet/issues/26 for more details. #[cfg(target_os = "linux")] fn get_listener(addr: SocketAddr, interface: &InterfaceName) -> Result { - let listener = TcpListener::bind(&addr)?; + let listener = TcpListener::bind(addr)?; listener.set_nonblocking(true)?; let sock = socket2::Socket::from(listener); sock.bind_device(Some(interface.as_str_lossy().as_bytes()))?; diff --git a/server/src/test.rs b/server/src/test.rs index 41386b6..291f018 100644 --- a/server/src/test.rs +++ b/server/src/test.rs @@ -104,7 +104,7 @@ impl Server { let interface = interface.parse().unwrap(); // Add developer CIDR and user CIDR and some peers for testing. let db = Connection::open(&conf.database_path(&interface))?; - db.pragma_update(None, "foreign_keys", &1)?; + db.pragma_update(None, "foreign_keys", 1)?; assert_eq!(ADMIN_CIDR_ID, create_cidr(&db, "admin", ADMIN_CIDR)?.id); assert_eq!( ADMIN_PEER_ID,