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,