Fix clippy errors

This commit is contained in:
Julius 2022-07-03 23:16:35 +02:00
parent 68bcdb987e
commit 1c6d8a90d4
Signed by: j00lz
GPG key ID: AF241B0AA237BBA2
3 changed files with 7 additions and 9 deletions

View file

@ -49,6 +49,12 @@ impl Env<'_> {
}
}
impl Default for Env<'_> {
fn default() -> Self {
Self::new()
}
}
impl<'env> Env<'env> {
pub fn new_with_parent(parent: &'env Env<'env>) -> Self {
Env {

View file

@ -69,7 +69,7 @@ fn handle_rules(mut p: pest::iterators::Pairs<Rule>) -> (Statement, FuncHolder)
)
}
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_else = None;
while let Some(expr) = inner.next() {

View file

@ -23,10 +23,6 @@ pub trait CustomValue: std::fmt::Debug + BoxClone {
false
}
fn ne(&self, other: &Value) -> bool {
!self.eq(other)
}
fn partial_cmp(&self, _: &Value) -> Option<std::cmp::Ordering> {
None
}
@ -40,10 +36,6 @@ impl PartialEq<Value> for dyn CustomValue {
fn eq(&self, other: &Value) -> bool {
self.eq(other)
}
fn ne(&self, other: &Value) -> bool {
self.ne(other)
}
}
impl PartialOrd<Value> for dyn CustomValue {