mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
auto clippy fixes
This commit is contained in:
parent
72c85efc83
commit
ef39bad7c6
146 changed files with 750 additions and 1005 deletions
|
@ -376,7 +376,7 @@ pub fn tree_as_string(root_node_id: MarkNodeId, mark_node_pool: &SlowPool) -> St
|
|||
|
||||
let node = mark_node_pool.get(root_node_id);
|
||||
|
||||
writeln!(full_string, "{} mn_id {}\n", node, root_node_id).unwrap();
|
||||
writeln!(full_string, "{node} mn_id {root_node_id}\n").unwrap();
|
||||
|
||||
tree_as_string_helper(node, 1, &mut full_string, mark_node_pool);
|
||||
|
||||
|
@ -399,7 +399,7 @@ fn tree_as_string_helper(
|
|||
.join("")
|
||||
.to_owned();
|
||||
|
||||
writeln!(full_str, "{} mn_id {}", child_str, child_id).unwrap();
|
||||
writeln!(full_str, "{child_str} mn_id {child_id}").unwrap();
|
||||
|
||||
tree_string.push_str(&full_str);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ pub type MarkResult<T, E = MarkError> = std::result::Result<T, E>;
|
|||
|
||||
impl From<UtilError> for MarkError {
|
||||
fn from(util_err: UtilError) -> Self {
|
||||
let msg = format!("{}", util_err);
|
||||
let msg = format!("{util_err}");
|
||||
|
||||
// hack to handle MarkError derive
|
||||
let dummy_res: Result<(), NoneError> = Err(NoneError {});
|
||||
|
|
|
@ -39,8 +39,8 @@ impl SlowPool {
|
|||
|
||||
for (mark_node_id, node) in self.nodes.iter().enumerate() {
|
||||
let ast_node_id_str = match mark_id_ast_id_map.get(mark_node_id) {
|
||||
Ok(ast_id) => format!("{:?}", ast_id),
|
||||
Err(err) => format!("{:?}", err),
|
||||
Ok(ast_id) => format!("{ast_id:?}"),
|
||||
Err(err) => format!("{err:?}"),
|
||||
};
|
||||
let ast_node_id: String = ast_node_id_str
|
||||
.chars()
|
||||
|
@ -52,7 +52,7 @@ impl SlowPool {
|
|||
let node_children = node.get_children_ids();
|
||||
|
||||
if !node_children.is_empty() {
|
||||
child_str = format!("children: {:?}", node_children);
|
||||
child_str = format!("children: {node_children:?}");
|
||||
}
|
||||
|
||||
write!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue