cargo fmt & fix

This commit is contained in:
Daniella / Tove 2023-03-06 17:06:38 +01:00
parent e605306ef9
commit fa79061660
Signed by: TudbuT
GPG key ID: 7D63D5634B7C417F
2 changed files with 2 additions and 4 deletions

View file

@ -21,7 +21,7 @@ pub fn lex(input: String) -> Result<Words, LexerError> {
} }
fn read_block(str_words: &[String], isfn: bool) -> Result<(Option<u32>, Words, usize), LexerError> { fn read_block(str_words: &[String], isfn: bool) -> Result<(Option<u32>, Words, usize), LexerError> {
if str_words.len() == 0 { if str_words.is_empty() {
return Ok((None, Words::new(Vec::new()), 0)); return Ok((None, Words::new(Vec::new()), 0));
} }
let mut rem = None; let mut rem = None;

View file

@ -840,9 +840,7 @@ impl Type {
q.append(&mut VecDeque::from(t.lock_ro().parents.clone())); q.append(&mut VecDeque::from(t.lock_ro().parents.clone()));
} }
for property in to_apply.into_iter().rev() { for property in to_apply.into_iter().rev() {
if !object.property_map.contains_key(&property) { object.property_map.entry(property).or_insert_with(|| Value::Null.spl());
object.property_map.insert(property, Value::Null.spl());
}
} }
} }