diff --git a/README.md b/README.md index e0de4d0..176538d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ For license inquiries, send mail to `/dev/null`. ## Architecture -Tis Crate features the world's most resilient bit filping algorithm. It's code adheres to the highest clean code standards +This Crate features the world's most resilient bit flipping algorithm. Its code adheres to the highest clean code standards and aims to provide a maintainable and future proof solution to all the boolean toggling needs there are. ## MSRV diff --git a/src/lib.rs b/src/lib.rs index 1af077d..3e785ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,8 +21,7 @@ pub use TogglingIsALifestyle as IAmTheToggler; impl TogglingIsALifestyle for bool { fn toggle(&mut self) { // i am so smart - let mut bool_toggler = BooleanTogglerFactory::create_boolean_toggler(self); - bool_toggler.toggle(); + BooleanTogglerFactory::create_boolean_toggler(self).toggle(); } } @@ -31,7 +30,7 @@ impl TogglingIsALifestyle for [bool; N] { fn toggle(&mut self) { // i am so fast for b in self { - let mut bool_toggler = BooleanTogglerFactory::create_boolean_toggler(self); + let mut bool_toggler = BooleanTogglerFactory::create_boolean_toggler(b); bool_toggler.toggle(); } }