From: Andrea Zagli Date: Sun, 5 Mar 2023 09:17:12 +0000 (+0100) Subject: In Form::remove_field, return after item found. X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=debd42db70acd6e96e6f36be481ba52a34a8a43a;p=rust%2Fzakform In Form::remove_field, return after item found. --- diff --git a/src/form.rs b/src/form.rs index 24a88a9..a01558c 100644 --- a/src/form.rs +++ b/src/form.rs @@ -18,6 +18,7 @@ impl Form { while i < self.fields.len() { if self.fields[i].get_name() == field_name { self.fields.remove(i); + return; } i += 1; }