From 92e98bbdcb58bf9a785bf1f8c24b4c2dd3ff9581 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Fri, 20 Jan 2023 16:50:41 +0000 Subject: [PATCH] More formatting and clippy fixes --- src/basic.rs | 11 ++--------- src/parsers/variables.rs | 5 +---- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/basic.rs b/src/basic.rs index 01a224f..03f8c26 100644 --- a/src/basic.rs +++ b/src/basic.rs @@ -1,15 +1,8 @@ use std::collections::HashMap; use nom::{ - branch::alt, - bytes::complete::{tag}, - character::{ - complete::{u64 as ccu64}, - }, - combinator::{map}, - multi::separated_list0, - sequence::{terminated}, - IResult, + branch::alt, bytes::complete::tag, character::complete::u64 as ccu64, combinator::map, + multi::separated_list0, sequence::terminated, IResult, }; use crate::parsers::{generic, variables}; diff --git a/src/parsers/variables.rs b/src/parsers/variables.rs index 8927c66..71cee18 100644 --- a/src/parsers/variables.rs +++ b/src/parsers/variables.rs @@ -42,10 +42,7 @@ pub fn parse_assignment(i: &str) -> IResult<&str, (String, Primitive)> { let (i, assigned_variable) = consume_line(i)?; Ok(( i, - ( - id.to_string(), - Primitive::Assignment(assigned_variable.to_string()), - ), + (id, Primitive::Assignment(assigned_variable.to_string())), )) }