rename JournalPriority::as_str to as_journald_str
This commit is contained in:
parent
3e388d2d46
commit
66a3c2409c
2 changed files with 8 additions and 4 deletions
|
|
@ -774,9 +774,13 @@ pub enum JournalPriority {
|
|||
}
|
||||
|
||||
impl JournalPriority {
|
||||
/// Returns the lowercase string journalctl expects for `-p`.
|
||||
/// Returns the lowercase string journalctl expects for `-p`. Named
|
||||
/// `as_journald_str` (not `as_str`) because this is a specific
|
||||
/// external-tool encoding, not the enum's general wire/db string —
|
||||
/// distinct call sites shouldn't reach for this by accident when they
|
||||
/// actually want the serde wire representation.
|
||||
#[must_use]
|
||||
pub fn as_str(self) -> &'static str {
|
||||
pub fn as_journald_str(self) -> &'static str {
|
||||
match self {
|
||||
Self::Emerg => "emerg",
|
||||
Self::Alert => "alert",
|
||||
|
|
|
|||
Loading…
Reference in a new issue