Skip to content

Fix build warnings for Rust 1.43.0 #1882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions parser/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use lalrpop;

fn main() {
lalrpop::process_root().unwrap()
}
1 change: 0 additions & 1 deletion vm/src/obj/objfloat.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use hexf_parse;
use num_bigint::{BigInt, ToBigInt};
use num_rational::Ratio;
use num_traits::{float::Float, pow, sign::Signed, ToPrimitive, Zero};
Expand Down
9 changes: 3 additions & 6 deletions vm/src/py_serde.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::fmt;

use serde;
use num_traits::cast::ToPrimitive;
use num_traits::sign::Signed;
use serde::de::{DeserializeSeed, Visitor};
use serde::ser::{Serialize, SerializeMap, SerializeSeq};

Expand All @@ -10,8 +9,6 @@ use crate::obj::{
};
use crate::pyobject::{IdProtocol, ItemProtocol, PyObjectRef, TypeProtocol};
use crate::VirtualMachine;
use num_traits::cast::ToPrimitive;
use num_traits::sign::Signed;

#[inline]
pub fn serialize<S>(
Expand Down Expand Up @@ -137,7 +134,7 @@ impl<'de> DeserializeSeed<'de> for PyObjectDeserializer<'de> {
impl<'de> Visitor<'de> for PyObjectDeserializer<'de> {
type Value = PyObjectRef;

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

Expand Down
5 changes: 0 additions & 5 deletions vm/src/stdlib/os.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use num_cpus;
use std::cell::{Cell, RefCell};
use std::ffi;
use std::fs::File;
Expand All @@ -13,8 +12,6 @@ use std::{env, fs};

use bitflags::bitflags;
#[cfg(unix)]
use exitcode;
#[cfg(unix)]
use nix::errno::Errno;
#[cfg(all(unix, not(target_os = "redox")))]
use nix::pty::openpty;
Expand All @@ -24,8 +21,6 @@ use nix::unistd::{self, Gid, Pid, Uid};
use std::os::unix::io::RawFd;
#[cfg(windows)]
use std::os::windows::io::RawHandle;
#[cfg(unix)]
use uname;

use super::errno::errors;
use crate::exceptions::PyBaseExceptionRef;
Expand Down
1 change: 0 additions & 1 deletion vm/src/stdlib/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use arr_macro::arr;
#[cfg(unix)]
use nix::unistd::alarm as sig_alarm;

use libc;
#[cfg(not(windows))]
use libc::{SIG_DFL, SIG_ERR, SIG_IGN};

Expand Down
2 changes: 0 additions & 2 deletions vm/src/stdlib/subprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use std::fs::File;
use std::io::ErrorKind;
use std::time::Duration;

use subprocess;

use crate::function::OptionalArg;
use crate::obj::objbytes::PyBytesRef;
use crate::obj::objlist::PyListRef;
Expand Down
1 change: 0 additions & 1 deletion wasm/lib/src/convert.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use js_sys::{Array, ArrayBuffer, Object, Promise, Reflect, SyntaxError, Uint8Array};
use serde_wasm_bindgen;
use wasm_bindgen::{closure::Closure, prelude::*, JsCast};

use rustpython_compiler::error::{CompileError, CompileErrorType};
Expand Down