fix warnings

This commit is contained in:
Michael Sippel 2023-10-02 15:15:58 +02:00
parent c96218e318
commit 61c06d5d03
Signed by: senvas
GPG key ID: F96CF119C34B64A6
3 changed files with 5 additions and 7 deletions

View file

@ -4,7 +4,7 @@ use crate::term::*;
impl TypeTerm { impl TypeTerm {
/// transform term to have at max 2 entries in Application list /// transform term to have at max 2 entries in Application list
pub fn curry(mut self) -> TypeTerm { pub fn curry(self) -> TypeTerm {
match self { match self {
TypeTerm::App(args) => { TypeTerm::App(args) => {
if args.len() >= 2 { if args.len() >= 2 {
@ -36,11 +36,11 @@ impl TypeTerm {
} }
/// summarize all curried applications into one vec /// summarize all curried applications into one vec
pub fn decurry(mut self) -> Self { pub fn decurry(self) -> Self {
match self { match self {
TypeTerm::App(mut args) => { TypeTerm::App(mut args) => {
if args.len() > 0 { if args.len() > 0 {
let mut a0 = args.remove(0).decurry(); let a0 = args.remove(0).decurry();
match a0 { match a0 {
TypeTerm::App(sub_args) => { TypeTerm::App(sub_args) => {
for (i,x) in sub_args.into_iter().enumerate() { for (i,x) in sub_args.into_iter().enumerate() {

View file

@ -1,6 +1,5 @@
use { use {
crate::{term::*, dict::*, parser::*}, crate::{dict::*}
std::str::FromStr
}; };
//<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\ //<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\

View file

@ -1,7 +1,6 @@
use { use {
crate::{term::*, dict::*, parser::*}, crate::{term::*, dict::*, parser::*}
std::str::FromStr
}; };
//<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\ //<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\