Merge pull request #102 from Ralith/fix-flags-display
More robust Display for flags types
This commit is contained in:
commit
b84596fb9a
2970
ash/src/vk.rs
2970
ash/src/vk.rs
File diff suppressed because it is too large
Load diff
|
@ -1515,7 +1515,7 @@ pub fn generate_const_displays<'a>(const_values: &HashMap<Ident, Vec<Ident>>) ->
|
|||
let mut first = true;
|
||||
let mut accum = value;
|
||||
for (bit, name) in known {
|
||||
if accum & bit != 0 {
|
||||
if *bit != 0 && accum & *bit == *bit {
|
||||
if !first { f.write_str(" | ")?; }
|
||||
f.write_str(name)?;
|
||||
first = false;
|
||||
|
|
Loading…
Reference in a new issue