mirror of
https://github.com/Noratrieb/bool-toggle.git
synced 2026-01-14 20:35:01 +01:00
Small improvements
This commit is contained in:
parent
8fd1d34f64
commit
9f09f9ef8a
3 changed files with 4 additions and 5 deletions
|
|
@ -25,7 +25,7 @@ For license inquiries, send mail to `/dev/null`.
|
||||||
|
|
||||||
## Architecture
|
## 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.
|
and aims to provide a maintainable and future proof solution to all the boolean toggling needs there are.
|
||||||
|
|
||||||
## MSRV
|
## MSRV
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ pub struct BooleanTogglerFactory;
|
||||||
impl BooleanTogglerFactory {
|
impl BooleanTogglerFactory {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn create_boolean_toggler(bool_to_toggle: &mut bool) -> BooleanToggler {
|
pub fn create_boolean_toggler(bool_to_toggle: &mut bool) -> BooleanToggler {
|
||||||
return BooleanToggler {
|
BooleanToggler {
|
||||||
bool_to_toggle: bool_to_toggle,
|
bool_to_toggle: bool_to_toggle,
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ pub use TogglingIsALifestyle as IAmTheToggler;
|
||||||
impl TogglingIsALifestyle for bool {
|
impl TogglingIsALifestyle for bool {
|
||||||
fn toggle(&mut self) {
|
fn toggle(&mut self) {
|
||||||
// i am so smart
|
// i am so smart
|
||||||
let mut bool_toggler = BooleanTogglerFactory::create_boolean_toggler(self);
|
BooleanTogglerFactory::create_boolean_toggler(self).toggle();
|
||||||
bool_toggler.toggle();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue