From 5415aefe159b17f6406ef7f690f2e533e9eb5541 Mon Sep 17 00:00:00 2001 From: Tarrence van As Date: Fri, 8 Mar 2024 08:50:10 -0500 Subject: [PATCH] fmt --- crates/dojo-lang/src/contract.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/dojo-lang/src/contract.rs b/crates/dojo-lang/src/contract.rs index 9ac2b33644..e96ad610f4 100644 --- a/crates/dojo-lang/src/contract.rs +++ b/crates/dojo-lang/src/contract.rs @@ -308,16 +308,17 @@ impl DojoContract { { let has_good_pos = (add_self && idx == 0) || (!add_self && idx == 1); let has_good_name = name.eq(&"world".to_string()); - + if has_good_pos && has_good_name { world_removed = true; None - } - else { + } else { if !has_good_pos { self.diagnostics.push(PluginDiagnostic { stable_ptr: param.stable_ptr().untyped(), - message: "The IWorldDispatcher parameter must be the first parameter of the function (self excluded).".to_string(), + message: "The IWorldDispatcher parameter must be the first \ + parameter of the function (self excluded)." + .to_string(), severity: Severity::Error, }); } @@ -325,7 +326,8 @@ impl DojoContract { if !has_good_name { self.diagnostics.push(PluginDiagnostic { stable_ptr: param.stable_ptr().untyped(), - message: "The IWorldDispatcher parameter must be named 'world'.".to_string(), + message: "The IWorldDispatcher parameter must be named 'world'." + .to_string(), severity: Severity::Error, }); }