From 718645cfb253cce7728c09fcf456c3da990b4444 Mon Sep 17 00:00:00 2001 From: Adam Greig Date: Thu, 8 Jun 2017 02:28:06 +0100 Subject: [PATCH] Rename is_bit_clear to bit_is_clear, is_bit_set to bit_is_set --- src/generate.rs | 8 ++++---- src/util.rs | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/generate.rs b/src/generate.rs index 88202a28..0fe91e15 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -889,13 +889,13 @@ pub fn fields( enum_items.push(quote! { /// Returns `true` if the bit is clear (0) #[inline(always)] - pub fn is_bit_clear(&self) -> bool { + pub fn bit_is_clear(&self) -> bool { !self.#bits() } /// Returns `true` if the bit is set (1) #[inline(always)] - pub fn is_bit_set(&self) -> bool { + pub fn bit_is_set(&self) -> bool { self.#bits() } }); @@ -1014,13 +1014,13 @@ pub fn fields( pc_r_impl_items.push(quote! { /// Returns `true` if the bit is clear (0) #[inline(always)] - pub fn is_bit_clear(&self) -> bool { + pub fn bit_is_clear(&self) -> bool { !self.#bits() } /// Returns `true` if the bit is set (1) #[inline(always)] - pub fn is_bit_set(&self) -> bool { + pub fn bit_is_set(&self) -> bool { self.#bits() } }); diff --git a/src/util.rs b/src/util.rs index 63570c21..ca419943 100644 --- a/src/util.rs +++ b/src/util.rs @@ -96,8 +96,6 @@ impl ToSanitizedSnakeCase for str { where, while, yield, - bit_set, - bit_clear, set_bit, clear_bit, bit,