Skip to content

Commit

Permalink
apply suggestion from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Damion Werner committed Dec 11, 2022
1 parent a80a5fb commit f215451
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rust/src/builder/azure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,10 @@ fn split_sas(sas: &str) -> Result<Vec<(String, String)>, BuilderError> {
.filter(|s| !s.chars().all(char::is_whitespace));
let mut pairs = Vec::new();
for kv_pair_str in kv_str_pairs {
let kv = kv_pair_str.trim().split_once('=');
let (k, v) = match kv {
None => return Err(BuilderError::MissingCredential),
Some(kv) => kv,
};
let (k, v) = kv_pair_str
.trim()
.split_once('=')
.ok_or(BuilderError::MissingCredential)?;
pairs.push((k.into(), v.into()))
}
Ok(pairs)
Expand Down

0 comments on commit f215451

Please sign in to comment.