Fix clippy errors
This commit is contained in:
parent
68bcdb987e
commit
1c6d8a90d4
|
@ -49,6 +49,12 @@ impl Env<'_> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Env<'_> {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'env> Env<'env> {
|
impl<'env> Env<'env> {
|
||||||
pub fn new_with_parent(parent: &'env Env<'env>) -> Self {
|
pub fn new_with_parent(parent: &'env Env<'env>) -> Self {
|
||||||
Env {
|
Env {
|
||||||
|
|
|
@ -69,7 +69,7 @@ fn handle_rules(mut p: pest::iterators::Pairs<Rule>) -> (Statement, FuncHolder)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Rule::if_block => {
|
Rule::if_block => {
|
||||||
let mut inner = pair.into_inner().into_iter();
|
let mut inner = pair.into_inner();
|
||||||
let mut the_list = vec![];
|
let mut the_list = vec![];
|
||||||
let mut the_else = None;
|
let mut the_else = None;
|
||||||
while let Some(expr) = inner.next() {
|
while let Some(expr) = inner.next() {
|
||||||
|
|
|
@ -23,10 +23,6 @@ pub trait CustomValue: std::fmt::Debug + BoxClone {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ne(&self, other: &Value) -> bool {
|
|
||||||
!self.eq(other)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn partial_cmp(&self, _: &Value) -> Option<std::cmp::Ordering> {
|
fn partial_cmp(&self, _: &Value) -> Option<std::cmp::Ordering> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
@ -40,10 +36,6 @@ impl PartialEq<Value> for dyn CustomValue {
|
||||||
fn eq(&self, other: &Value) -> bool {
|
fn eq(&self, other: &Value) -> bool {
|
||||||
self.eq(other)
|
self.eq(other)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ne(&self, other: &Value) -> bool {
|
|
||||||
self.ne(other)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartialOrd<Value> for dyn CustomValue {
|
impl PartialOrd<Value> for dyn CustomValue {
|
||||||
|
|
Loading…
Reference in a new issue