Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Jun 13, 2024
1 parent dd2fe20 commit ef8e7b4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions toml-span/src/de_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ impl<'de> TableHelper<'de> {
pub fn optional_s<T: Deserialize<'de>>(&mut self, name: &'static str) -> Option<Spanned<T>> {
self.expected.push(name);

let Some(mut val) = self.table.remove(&name.into()) else {
return None;
};
let mut val = self.table.remove(&name.into())?;

match Spanned::<T>::deserialize(&mut val) {
Ok(v) => Some(v),
Expand Down

0 comments on commit ef8e7b4

Please sign in to comment.