Skip to content

Commit

Permalink
rename context
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Matous <m@matous.dev>
  • Loading branch information
mmatous authored and meain committed Mar 31, 2022
1 parent f5debb8 commit 90199a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub enum Elem {
NoAccess,
Octal,
Acl,
SecurityContext,
Context,

/// Last Time Modified
DayOld,
Expand Down Expand Up @@ -107,7 +107,7 @@ impl Elem {
Elem::NoAccess => theme.permission.no_access,
Elem::Octal => theme.permission.octal,
Elem::Acl => theme.permission.acl,
Elem::SecurityContext => theme.permission.security_context,
Elem::Context => theme.permission.context,

Elem::DayOld => theme.date.day_old,
Elem::HourOld => theme.date.hour_old,
Expand Down Expand Up @@ -348,7 +348,7 @@ mod elem {
no_access: Color::AnsiValue(245), // Grey
octal: Color::AnsiValue(6),
acl: Color::DarkCyan,
security_context: Color::Cyan,
context: Color::Cyan,
},
file_type: theme::FileType {
file: theme::File {
Expand Down
4 changes: 2 additions & 2 deletions src/color/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct Permission {
pub no_access: Color,
pub octal: Color,
pub acl: Color,
pub security_context: Color,
pub context: Color,
}

#[derive(Debug, Deserialize, PartialEq)]
Expand Down Expand Up @@ -137,7 +137,7 @@ impl Default for Permission {
no_access: Color::AnsiValue(245), // Grey
octal: Color::AnsiValue(6),
acl: Color::DarkCyan,
security_context: Color::Cyan,
context: Color::Cyan,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/meta/access_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl AccessControl {
if self.has_acl {
colors.colorize(String::from("+"), &Elem::Acl)
} else if !self.selinux_context.is_empty() || !self.smack_context.is_empty() {
colors.colorize(String::from("."), &Elem::SecurityContext)
colors.colorize(String::from("."), &Elem::Context)
} else {
colors.colorize(String::from(""), &Elem::Acl)
}
Expand All @@ -61,7 +61,7 @@ impl AccessControl {
if context.is_empty() {
context += "?";
}
colors.colorize(context, &Elem::SecurityContext)
colors.colorize(context, &Elem::Context)
}
}

Expand Down

0 comments on commit 90199a2

Please sign in to comment.