Skip to content

Commit

Permalink
Update src/lazy/expanded/struct.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Barr <[email protected]>
  • Loading branch information
zslayton and jobarr-amzn authored Jan 3, 2025
1 parent b738f70 commit 2ec8858
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lazy/expanded/struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ pub enum FieldExpr<'top, D: Decoder> {
impl<'top, D: Decoder> FieldExpr<'top, D> {
pub fn name(&self) -> Option<&LazyExpandedFieldName<'top, D>> {
use FieldExpr::*;
let name = match self {
NameValue(name, _) | NameMacro(name, _) => name,
EExp(_) => return None,
};
Some(name)
match self {
NameValue(name, _) | NameMacro(name, _) => Some(name),
EExp(_) => None,
}
}

pub fn name_is(&self, text: &str) -> IonResult<bool> {
Expand Down

0 comments on commit 2ec8858

Please sign in to comment.