mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 03:55:11 +00:00
Convert from bool to u8 using From trait
This commit is contained in:
parent
7595289698
commit
19601267cf
@ -6,7 +6,7 @@ use crate::output::cell::TextCell;
|
||||
|
||||
impl f::OctalPermissions {
|
||||
fn bits_to_octal(r: bool, w: bool, x: bool) -> u8 {
|
||||
(r as u8) * 4 + (w as u8) * 2 + (x as u8)
|
||||
u8::from(r) * 4 + u8::from(w) * 2 + u8::from(x)
|
||||
}
|
||||
|
||||
pub fn render(&self, style: Style) -> TextCell {
|
||||
|
Loading…
Reference in New Issue
Block a user