Skip to content

Commit

Permalink
refactor: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
tbmc committed May 23, 2024
1 parent 1b93a55 commit 29d5f04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/abstract_syntax_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 29d5f04

Please sign in to comment.