Skip to content

Commit 9120b8d

Browse files
committed
Code tidyup
1 parent 48b97ce commit 9120b8d

File tree

5 files changed

+19
-21
lines changed

5 files changed

+19
-21
lines changed

src/eval/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{
2+
error::*
3+
,
24
eval::globals::get_standard_globals,
3-
parse::literal::Address,
4-
error::*,
55
eval::operators::get_standard_operators,
66
eval::Object,
77
parse::objects::*,

src/eval/operators.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
use crate::{
2-
vec::Acc,
32
error::*,
43
eval::context::Operator,
54
eval::context::OperatorBuilder,
6-
eval::Object
5+
eval::Object,
6+
vec::Acc
77
};
88
use alloc::{
9-
string::String,
109
borrow::ToOwned,
1110
format,
11+
string::String,
1212
vec,
1313
vec::Vec
1414
};
15-
use alloc::string::ToString;
1615
use core::ops::Add;
1716

1817
pub(crate) fn get_standard_operators() -> Vec<Operator> {

src/parse/key.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
use alloc::format;
21
use crate::parse::parser;
3-
use alloc::string::{String, ToString};
2+
use alloc::format;
3+
use alloc::string::String;
44
use core::num::ParseIntError;
5-
use nom::{error::{FromExternalError, ParseError}, FindToken, IResult};
5+
use nom::error::FromExternalError;
6+
use nom::error::ParseError;
7+
use nom::FindToken;
8+
use nom::IResult;
69

710
#[derive(Debug, Eq, PartialEq)]
811
pub enum Key {
@@ -134,4 +137,4 @@ pub(crate) fn parse_string<'a>(start: char, end: char) -> impl Fn(&'a str) -> IR
134137

135138
parser::delimited(parser::char(start), parse_raw_string, parser::char(end))(input)
136139
}
137-
}
140+
}

src/parse/literal.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
use alloc::borrow::ToOwned;
2-
use crate::parse::key::parse_string;
31
use crate::parse::key::Key;
42
use crate::parse::parser;
3+
use alloc::borrow::ToOwned;
54
use alloc::format;
65
use alloc::string::String;
76
use alloc::vec::Vec;
8-
use nom::Err::Error;
97
use nom::IResult;
108

119
#[derive(Debug, PartialEq)]

src/parse/mod.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ use alloc::{
1919
borrow::ToOwned,
2020
collections::BTreeMap,
2121
rc::Rc,
22+
string::String,
2223
vec,
23-
vec::Vec,
24-
string::String
24+
vec::Vec
2525
};
2626
use core::ops::Deref;
2727

@@ -35,14 +35,12 @@ pub(super) mod parser {
3535
}
3636

3737
pub(crate) mod objects {
38-
pub(crate) use crate::parse::value::Value;
39-
pub(crate) use crate::parse::literal::Literal;
40-
pub(crate) use crate::parse::expression::Expression;
41-
pub(crate) use crate::parse::call::Call;
4238
pub(crate) use crate::parse::access::Access;
39+
pub(crate) use crate::parse::call::Call;
40+
pub(crate) use crate::parse::expression::Expression;
4341
pub(crate) use crate::parse::key::Key;
44-
pub(crate) use crate::parse::list::List;
45-
pub(crate) use crate::parse::associative_array::AssociativeArray;
42+
pub(crate) use crate::parse::literal::Literal;
43+
pub(crate) use crate::parse::value::Value;
4644
}
4745

4846

0 commit comments

Comments
 (0)