Skip to content

Commit

Permalink
render [] as empty string in AtomOrString::as_str() (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthom committed Jan 11, 2022
1 parent e3622e0 commit 5f4e701
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/forms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ impl AtomOrString {
#[inline]
pub fn as_str(&self) -> &str {
match self {
AtomOrString::Atom(atom) if atom == &atom!("[]") => "",
AtomOrString::Atom(atom) => atom.as_str(),
AtomOrString::String(string) => string.as_str(),
}
Expand Down

0 comments on commit 5f4e701

Please sign in to comment.