From: Fayeed Pawaskar Date: Mon, 24 Jul 2023 07:11:56 +0000 (+0530) Subject: Fixed warnings X-Git-Tag: v0.9.2~23^2^2~1 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=7248425a7631f4d7edc35237a38a79f451943738;p=scryer-prolog.git Fixed warnings --- diff --git a/src/arithmetic.rs b/src/arithmetic.rs index cfdc5b08..b48f43aa 100644 --- a/src/arithmetic.rs +++ b/src/arithmetic.rs @@ -381,7 +381,7 @@ pub(crate) fn rnd_i<'a>(n: &'a Number, arena: &mut Arena) -> Number { } } &Number::Rational(ref r) => { - let (mut fract, mut floor) = (r.fract(), r.floor()); + let (_, floor) = (r.fract(), r.floor()); if let Some(floor) = floor.to_i64() { fixnum!(Number, floor, arena) diff --git a/src/heap_print.rs b/src/heap_print.rs index 45fb9bf6..8d185e5f 100644 --- a/src/heap_print.rs +++ b/src/heap_print.rs @@ -23,7 +23,6 @@ use dashu::base::DivRemEuclid; use ordered_float::OrderedFloat; use indexmap::IndexMap; -use tokio::io::Interest; use std::cell::Cell; use std::convert::TryFrom; diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index 7ee4c311..fb54d361 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -36,7 +36,7 @@ use ordered_float::OrderedFloat; use fxhash::{FxBuildHasher, FxHasher}; use indexmap::IndexSet; -use ref_thread_local::{RefThreadLocal, ref_thread_local}; +pub(crate) use ref_thread_local::RefThreadLocal; use std::borrow::BorrowMut; use std::cell::Cell; diff --git a/src/parser/ast.rs b/src/parser/ast.rs index 73f5b4e5..6846aa72 100644 --- a/src/parser/ast.rs +++ b/src/parser/ast.rs @@ -7,7 +7,7 @@ use crate::types::HeapCellValueTag; use std::cell::{Cell, Ref, RefCell, RefMut}; use std::fmt; use std::hash::{Hash, Hasher}; -use std::io::{Error as IOError}; +use std::io::Error as IOError; use std::ops::{Deref, Neg}; use std::rc::Rc; use std::vec::Vec; diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 5d637e02..f427f18a 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -958,7 +958,7 @@ impl<'a, R: CharRead> Parser<'a, R> { } fn shift_token(&mut self, token: Token, op_dir: &CompositeOpDir) -> Result<(), ParserError> { - fn negate_int_rc(mut t: TypedArenaPtr) -> TypedArenaPtr { + fn negate_int_rc(t: TypedArenaPtr) -> TypedArenaPtr { let i: Integer = (*t).clone(); let mut data = i.neg(); TypedArenaPtr::new(&mut data)