From dc0bd73d128d56cde1f591fe6b4ff2cee0873e89 Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Wed, 27 Feb 2019 20:22:53 +0200 Subject: [PATCH] Fix compiler warnings --- vm/src/stdlib/socket.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vm/src/stdlib/socket.rs b/vm/src/stdlib/socket.rs index 8c82368c7..cd4bbdf70 100644 --- a/vm/src/stdlib/socket.rs +++ b/vm/src/stdlib/socket.rs @@ -2,7 +2,7 @@ use std::cell::RefCell; use std::io; use std::io::Read; use std::io::Write; -use std::net::{SocketAddr, TcpListener, TcpStream, UdpSocket}; +use std::net::{SocketAddr, TcpListener, TcpStream}; use crate::obj::objbytes; use crate::obj::objint; @@ -52,7 +52,7 @@ impl SocketKind { enum Connection { TcpListener(TcpListener), TcpStream(TcpStream), - UdpSocket(UdpSocket), + // UdpSocket(UdpSocket), } impl Connection { @@ -194,6 +194,11 @@ fn get_address_string( } fn socket_listen(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult { + arg_check!( + vm, + args, + required = [(_zelf, None), (_num, Some(vm.ctx.int_type()))] + ); Ok(vm.get_none()) }