Empty bitflags has unhelpful Debug representation #64

Closed
opened 2017-03-06 22:37:56 -06:00 by dtolnay · 1 comment
dtolnay commented 2017-03-06 22:37:56 -06:00 (Migrated from github.com)

The Debug representation is the empty string. This is not very debuggable. I think "(empty)" would be more helpful.

#[macro_use]
extern crate bitflags;

bitflags! {
    pub flags Flags: u8 {
        const A = 0,
    }
}

fn main() {
    println!("{:?}", Flags::empty());
}
The Debug representation is the empty string. This is not very debuggable. I think "(empty)" would be more helpful. ```rust #[macro_use] extern crate bitflags; bitflags! { pub flags Flags: u8 { const A = 0, } } fn main() { println!("{:?}", Flags::empty()); } ```
brson commented 2017-03-20 17:40:21 -05:00 (Migrated from github.com)

Do as suggested in the op.

Do as suggested in the op.
Sign in to join this conversation.
No labels
bug
good first issue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-bitflags/bitflags#64
No description provided.