Skip to content

Commit dff6b0b

Browse files
committed
Rename sk to socket_kind
1 parent 2bdbc40 commit dff6b0b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vm/src/stdlib/socket.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ impl Write for Connection {
8787

8888
pub struct Socket {
8989
address_family: AddressFamily,
90-
sk: SocketKind,
90+
socket_kind: SocketKind,
9191
con: Option<Connection>,
9292
}
9393

9494
impl Socket {
95-
fn new(address_family: AddressFamily, sk: SocketKind) -> Socket {
95+
fn new(address_family: AddressFamily, socket_kind: SocketKind) -> Socket {
9696
Socket {
9797
address_family,
98-
sk: sk,
98+
socket_kind: socket_kind,
9999
con: None,
100100
}
101101
}
@@ -198,7 +198,7 @@ fn socket_accept(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
198198

199199
let socket = RefCell::new(Socket {
200200
address_family: socket.borrow().address_family.clone(),
201-
sk: socket.borrow().sk.clone(),
201+
socket_kind: socket.borrow().socket_kind.clone(),
202202
con: Some(Connection::TcpStream(tcp_stream)),
203203
});
204204

@@ -258,7 +258,7 @@ fn socket_close(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
258258
PyObjectPayload::Socket { ref socket } => {
259259
let mut socket = socket.borrow_mut();
260260
match socket.address_family {
261-
AddressFamily::AfInet => match socket.sk {
261+
AddressFamily::AfInet => match socket.socket_kind {
262262
SocketKind::SockStream => {
263263
socket.con = None;
264264
Ok(vm.get_none())

0 commit comments

Comments
 (0)