Fixed warnings

This commit is contained in:
Fayeed Pawaskar
2023-07-24 12:41:56 +05:30
parent 1dcc1ca524
commit 7248425a76
5 changed files with 4 additions and 5 deletions

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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<Integer>) -> TypedArenaPtr<Integer> {
fn negate_int_rc(t: TypedArenaPtr<Integer>) -> TypedArenaPtr<Integer> {
let i: Integer = (*t).clone();
let mut data = i.neg();
TypedArenaPtr::new(&mut data)