From 03a4e762925f974301a9c12186f0ea36afb5386a Mon Sep 17 00:00:00 2001 From: John Date: Fri, 26 Jul 2024 00:15:00 -0500 Subject: [PATCH] cl-typeck: rustfmt implement.rs --- compiler/cl-typeck/src/stage/implement.rs | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/compiler/cl-typeck/src/stage/implement.rs b/compiler/cl-typeck/src/stage/implement.rs index 775178e..d94be5f 100644 --- a/compiler/cl-typeck/src/stage/implement.rs +++ b/compiler/cl-typeck/src/stage/implement.rs @@ -1,23 +1,23 @@ use crate::{handle::Handle, table::Table}; - pub fn implement(table: &mut Table) -> Vec { - let pending = std::mem::take(&mut table.impls); - let mut errors = vec![]; - for node in pending { - if let Err(e) = impl_one(table, node) { - errors.push(e); - } +pub fn implement(table: &mut Table) -> Vec { + let pending = std::mem::take(&mut table.impls); + let mut errors = vec![]; + for node in pending { + if let Err(e) = impl_one(table, node) { + errors.push(e); } - errors } + errors +} - pub fn impl_one(table: &mut Table, node: Handle) -> Result<(), Handle> { - let Some(target) = table.impl_target(node) else { - Err(node)? - }; - let Table { children, imports, .. } = table; - if let Some(children) = children.get(&node) { - imports.entry(target).or_default().extend(children); - } - Ok(()) +pub fn impl_one(table: &mut Table, node: Handle) -> Result<(), Handle> { + let Some(target) = table.impl_target(node) else { + Err(node)? + }; + let Table { children, imports, .. } = table; + if let Some(children) = children.get(&node) { + imports.entry(target).or_default().extend(children); } + Ok(()) +}