From 61c06d5d032518a3f2f7c71b95c23931b3ec7ca5 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Mon, 2 Oct 2023 15:15:58 +0200 Subject: [PATCH] fix warnings --- src/curry.rs | 6 +++--- src/test/curry.rs | 3 +-- src/test/parser.rs | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/curry.rs b/src/curry.rs index 7ee04d8..1c6deab 100644 --- a/src/curry.rs +++ b/src/curry.rs @@ -4,7 +4,7 @@ use crate::term::*; impl TypeTerm { /// transform term to have at max 2 entries in Application list - pub fn curry(mut self) -> TypeTerm { + pub fn curry(self) -> TypeTerm { match self { TypeTerm::App(args) => { if args.len() >= 2 { @@ -36,11 +36,11 @@ impl TypeTerm { } /// summarize all curried applications into one vec - pub fn decurry(mut self) -> Self { + pub fn decurry(self) -> Self { match self { TypeTerm::App(mut args) => { if args.len() > 0 { - let mut a0 = args.remove(0).decurry(); + let a0 = args.remove(0).decurry(); match a0 { TypeTerm::App(sub_args) => { for (i,x) in sub_args.into_iter().enumerate() { diff --git a/src/test/curry.rs b/src/test/curry.rs index 41575b2..c728a37 100644 --- a/src/test/curry.rs +++ b/src/test/curry.rs @@ -1,6 +1,5 @@ use { - crate::{term::*, dict::*, parser::*}, - std::str::FromStr + crate::{dict::*} }; //<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\ diff --git a/src/test/parser.rs b/src/test/parser.rs index 273232b..fe75075 100644 --- a/src/test/parser.rs +++ b/src/test/parser.rs @@ -1,7 +1,6 @@ use { - crate::{term::*, dict::*, parser::*}, - std::str::FromStr + crate::{term::*, dict::*, parser::*} }; //<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\