diff --git a/src/abstract_syntax_tree.rs b/src/abstract_syntax_tree.rs index 70b4239..0b7164f 100644 --- a/src/abstract_syntax_tree.rs +++ b/src/abstract_syntax_tree.rs @@ -78,13 +78,13 @@ impl Ast { impl AstNode { pub fn new(value: char, parent_index: usize, is_leaf: bool, index_in_string: usize) -> Self { - return AstNode { + AstNode { char: value, sub_assets_indexes: Vec::new(), parent_index: Some(parent_index), is_leaf, index_in_string, - }; + } } } diff --git a/src/runtime.rs b/src/runtime.rs index 1ba785e..ec27824 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -108,7 +108,7 @@ impl<'a> Runtime<'a> { if result.is_err() { return Err(result.err().unwrap().to_string()); } - buffer = buffer.replace("\r", ""); + buffer = buffer.replace('\r', ""); let mut vec = buffer.as_bytes().to_vec(); vec.push(0); self.read_buffer = vec;