Skip to content

Commit

Permalink
Auto merge of #7904 - ehuss:rustfmt-1.4.12-fix, r=alexcrichton
Browse files Browse the repository at this point in the history
Update for nightly rustfmt.

Most recently nightly seems to have slightly different behavior.
  • Loading branch information
bors committed Feb 19, 2020
2 parents e0678fb + 4b6c26d commit c8019b1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/cargo/util/config/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ macro_rules! deserialize_method {
where
V: de::Visitor<'de>,
{
let v = self.config.$getter(&self.key)?.ok_or_else(||
ConfigError::missing(&self.key))?;
let Value{val, definition} = v;
let v = self
.config
.$getter(&self.key)?
.ok_or_else(|| ConfigError::missing(&self.key))?;
let Value { val, definition } = v;
let res: Result<V::Value, ConfigError> = visitor.$visit(val);
res.map_err(|e| e.with_key_context(&self.key, definition))
}
}
};
}

impl<'de, 'config> de::Deserializer<'de> for Deserializer<'config> {
Expand Down

0 comments on commit c8019b1

Please sign in to comment.