Skip to content

Commit 9bf17af

Browse files
committed
squash! opaque -> is_opaque, hidden -> is_hiden, mutable -> is_mutable.
1 parent dd21929 commit 9bf17af

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/codegen/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ impl CodeGenerator for Item {
287287
ctx: &BindgenContext,
288288
result: &mut CodegenResult,
289289
_extra: &()) {
290-
if self.hidden(ctx) || result.seen(self.id()) {
290+
if self.is_hidden(ctx) || result.seen(self.id()) {
291291
return;
292292
}
293293

@@ -433,7 +433,7 @@ impl CodeGenerator for Type {
433433
}
434434

435435
let mut applicable_template_args = item.applicable_template_args(ctx);
436-
let inner_rust_type = if item.opaque(ctx) {
436+
let inner_rust_type = if item.is_opaque(ctx) {
437437
applicable_template_args.clear();
438438
// Pray if there's no layout.
439439
let layout = self.layout(ctx).unwrap_or_else(Layout::zero);
@@ -922,7 +922,7 @@ impl CodeGenerator for CompInfo {
922922
}
923923

924924
// Yeah, sorry about that.
925-
if item.opaque(ctx) {
925+
if item.is_opaque(ctx) {
926926
fields.clear();
927927
methods.clear();
928928
for i in 0..template_args_used.len() {
@@ -1449,7 +1449,7 @@ impl ToRustTy for Type {
14491449
}
14501450
TypeKind::ResolvedTypeRef(inner) => inner.to_rust_ty(ctx),
14511451
TypeKind::Alias(ref spelling, inner) => {
1452-
if item.opaque(ctx) {
1452+
if item.is_opaque(ctx) {
14531453
// Pray if there's no available layout.
14541454
let layout = self.layout(ctx).unwrap_or_else(Layout::zero);
14551455
BlobTyBuilder::new(layout).build()
@@ -1460,7 +1460,7 @@ impl ToRustTy for Type {
14601460
}
14611461
}
14621462
TypeKind::Comp(ref info) => {
1463-
if item.opaque(ctx) || info.has_non_type_template_params() {
1463+
if item.is_opaque(ctx) || info.has_non_type_template_params() {
14641464
return match self.layout(ctx) {
14651465
Some(layout) => {
14661466
BlobTyBuilder::new(layout).build()
@@ -1645,14 +1645,14 @@ impl TypeCollector for Item {
16451645
context: &BindgenContext,
16461646
types: &mut ItemSet,
16471647
_extra: &()) {
1648-
if self.hidden(context) || types.contains(&self.id()) {
1648+
if self.is_hidden(context) || types.contains(&self.id()) {
16491649
return;
16501650
}
16511651

16521652
match *self.kind() {
16531653
ItemKind::Type(ref ty) => {
16541654
types.insert(self.id());
1655-
if !self.opaque(context) {
1655+
if !self.is_opaque(context) {
16561656
ty.collect_types(context, types, self);
16571657
}
16581658
}

src/ir/comp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl Field {
114114
self.bitfield
115115
}
116116

117-
pub fn mutable(&self) -> bool {
117+
pub fn is_mutable(&self) -> bool {
118118
self.mutable
119119
}
120120

src/ir/item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,14 @@ impl Item {
234234

235235
/// Whether this item should be hidden, either due to annotations, or due to
236236
/// other kind of configuration.
237-
pub fn hidden(&self, ctx: &BindgenContext) -> bool {
237+
pub fn is_hidden(&self, ctx: &BindgenContext) -> bool {
238238
debug_assert!(ctx.in_codegen_phase(),
239239
"You're not supposed to call this yet");
240240
self.annotations.hide() ||
241241
ctx.hidden_by_name(&self.real_canonical_name(ctx, false))
242242
}
243243

244-
pub fn opaque(&self, ctx: &BindgenContext) -> bool {
244+
pub fn is_opaque(&self, ctx: &BindgenContext) -> bool {
245245
debug_assert!(ctx.in_codegen_phase(),
246246
"You're not supposed to call this yet");
247247
self.annotations.opaque() ||

0 commit comments

Comments
 (0)