server: fix clippy nit in linux-only code
parent
1aa16c84f5
commit
f36eb301ce
|
@ -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<TcpListener, Error> {
|
||||
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()))?;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue