Skip to content

Commit ca24283

Browse files
authored
Merge pull request RustPython#1882 from youknowone/fix-rust-warnings
Fix build warnings for Rust 1.43.0
2 parents 4082b13 + ce2d9d8 commit ca24283

File tree

7 files changed

+3
-18
lines changed

7 files changed

+3
-18
lines changed

parser/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use lalrpop;
2-
31
fn main() {
42
lalrpop::process_root().unwrap()
53
}

vm/src/obj/objfloat.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use hexf_parse;
21
use num_bigint::{BigInt, ToBigInt};
32
use num_rational::Ratio;
43
use num_traits::{float::Float, pow, sign::Signed, ToPrimitive, Zero};

vm/src/py_serde.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use std::fmt;
2-
3-
use serde;
1+
use num_traits::cast::ToPrimitive;
2+
use num_traits::sign::Signed;
43
use serde::de::{DeserializeSeed, Visitor};
54
use serde::ser::{Serialize, SerializeMap, SerializeSeq};
65

@@ -10,8 +9,6 @@ use crate::obj::{
109
};
1110
use crate::pyobject::{IdProtocol, ItemProtocol, PyObjectRef, TypeProtocol};
1211
use crate::VirtualMachine;
13-
use num_traits::cast::ToPrimitive;
14-
use num_traits::sign::Signed;
1512

1613
#[inline]
1714
pub fn serialize<S>(
@@ -137,7 +134,7 @@ impl<'de> DeserializeSeed<'de> for PyObjectDeserializer<'de> {
137134
impl<'de> Visitor<'de> for PyObjectDeserializer<'de> {
138135
type Value = PyObjectRef;
139136

140-
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
137+
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
141138
formatter.write_str("a type that can deserialise in Python")
142139
}
143140

vm/src/stdlib/os.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use num_cpus;
21
use std::cell::{Cell, RefCell};
32
use std::ffi;
43
use std::fs::File;
@@ -13,8 +12,6 @@ use std::{env, fs};
1312

1413
use bitflags::bitflags;
1514
#[cfg(unix)]
16-
use exitcode;
17-
#[cfg(unix)]
1815
use nix::errno::Errno;
1916
#[cfg(all(unix, not(target_os = "redox")))]
2017
use nix::pty::openpty;
@@ -24,8 +21,6 @@ use nix::unistd::{self, Gid, Pid, Uid};
2421
use std::os::unix::io::RawFd;
2522
#[cfg(windows)]
2623
use std::os::windows::io::RawHandle;
27-
#[cfg(unix)]
28-
use uname;
2924

3025
use super::errno::errors;
3126
use crate::exceptions::PyBaseExceptionRef;

vm/src/stdlib/signal.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use arr_macro::arr;
88
#[cfg(unix)]
99
use nix::unistd::alarm as sig_alarm;
1010

11-
use libc;
1211
#[cfg(not(windows))]
1312
use libc::{SIG_DFL, SIG_ERR, SIG_IGN};
1413

vm/src/stdlib/subprocess.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use std::fs::File;
44
use std::io::ErrorKind;
55
use std::time::Duration;
66

7-
use subprocess;
8-
97
use crate::function::OptionalArg;
108
use crate::obj::objbytes::PyBytesRef;
119
use crate::obj::objlist::PyListRef;

wasm/lib/src/convert.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use js_sys::{Array, ArrayBuffer, Object, Promise, Reflect, SyntaxError, Uint8Array};
2-
use serde_wasm_bindgen;
32
use wasm_bindgen::{closure::Closure, prelude::*, JsCast};
43

54
use rustpython_compiler::error::{CompileError, CompileErrorType};

0 commit comments

Comments
 (0)