Skip to content

Commit

Permalink
Rename Symbol::undefined() -> Symbol::is_undefined()
Browse files Browse the repository at this point in the history
This better matches other boolean flag helper method names
  • Loading branch information
cole14 committed Oct 30, 2022
1 parent 29a604e commit 7006cb2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl Symbol {
///
/// When linking and loading, undefined symbols in this object get linked to
/// a defined symbol in another object.
pub fn undefined(&self) -> bool {
pub fn is_undefined(&self) -> bool {
self.st_shndx == gabi::SHN_UNDEF
}

Expand Down Expand Up @@ -200,7 +200,7 @@ mod table_tests {
st_info: 0,
st_other: 0,
};
assert!(undef_sym.undefined());
assert!(undef_sym.is_undefined());

let def_sym = Symbol {
st_name: 0,
Expand All @@ -210,7 +210,7 @@ mod table_tests {
st_info: 0,
st_other: 0,
};
assert!(!def_sym.undefined());
assert!(!def_sym.is_undefined());
}

#[test]
Expand Down

0 comments on commit 7006cb2

Please sign in to comment.