Skip to content

Rename is_bit_clear to bit_is_clear, is_bit_set to bit_is_set #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
});
Expand Down Expand Up @@ -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()
}
});
Expand Down
2 changes: 0 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ impl ToSanitizedSnakeCase for str {
where,
while,
yield,
bit_set,
bit_clear,
set_bit,
clear_bit,
bit,
Expand Down