From 906cb833a9947f106eab8d261ff87b28f0e0679c Mon Sep 17 00:00:00 2001 From: Dat Adithya <31721284+dat-adi@users.noreply.github.com> Date: Thu, 11 Mar 2021 11:26:15 +0530 Subject: [PATCH] Fixed incorrect function name and Docstring - Changed `decrement_visiotr` to `decrement_visitor` for clean function name usage. - Updated a few docstrings. --- src/mcaptcha.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mcaptcha.rs b/src/mcaptcha.rs index b996b82..1e5ade2 100644 --- a/src/mcaptcha.rs +++ b/src/mcaptcha.rs @@ -90,7 +90,7 @@ pub struct MCaptcha { } impl MCaptcha { - /// incerment visiotr count by one + /// increments the visitor count by one pub fn add_visitor(&mut self) { self.visitor_threshold += 1; if self.visitor_threshold > self.defense.visitor_threshold() { @@ -100,8 +100,8 @@ impl MCaptcha { } } - /// deccerment visiotr count by one - pub fn decrement_visiotr(&mut self) { + /// decrements the visitor count by one + pub fn decrement_visitor(&mut self) { if self.visitor_threshold > 0 { self.visitor_threshold -= 1; } @@ -129,7 +129,7 @@ struct DeleteVisitor; impl Handler for MCaptcha { type Result = (); fn handle(&mut self, _msg: DeleteVisitor, _ctx: &mut Self::Context) -> Self::Result { - self.decrement_visiotr(); + self.decrement_visitor(); } }