summaryrefslogtreecommitdiff
path: root/src/atom/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/atom/mod.rs')
-rw-r--r--src/atom/mod.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/atom/mod.rs b/src/atom/mod.rs
index 82cef15..0b31223 100644
--- a/src/atom/mod.rs
+++ b/src/atom/mod.rs
@@ -85,8 +85,9 @@ pub struct SlotName(#[get(method = "name", kind = "deref")] String);
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum Slot {
Wildcard,
- Equal {
- primary: Option<SlotName>,
+ Equal,
+ NameEqual {
+ primary: SlotName,
sub: Option<SlotName>,
},
Name {
@@ -592,10 +593,11 @@ impl fmt::Display for Slot {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::Wildcard => write!(f, "*"),
- Self::Equal { primary, sub } => {
- if let Some(primary) = primary {
- write!(f, "{primary}")?;
- }
+ Self::Equal => {
+ write!(f, "=")
+ }
+ Self::NameEqual { primary, sub } => {
+ write!(f, "{primary}")?;
if let Some(sub) = sub {
write!(f, "/{sub}")?;