Skip to content

Commit

Permalink
PR review fixes, rust fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Dec 23, 2019
1 parent c7958f6 commit 93fbf34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/src/common/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ macro_rules! impl_bytes {
let bytes = match base64::decode(data) {
Ok(b) => b,
Err(err) => return match err {
base64::DecodeError::InvalidByte(pos, v) => Err(::serde::de::Error::invalid_byte(pos, v),
base64::DecodeError::InvalidLength => Err(::serde::de::Error::invalid_length(data.len(), &self))),
base64::DecodeError::InvalidLastSymbol(pos, v) => Err(::serde::de::Error::invalid_value(v, &self)),
base64::DecodeError::InvalidByte(pos, v) => Err(::serde::de::Error::custom(format!("invalid byte '{}' at position {}", v, pos))),
base64::DecodeError::InvalidLength => Err(::serde::de::Error::invalid_length(data.len(), &self)),
base64::DecodeError::InvalidLastSymbol(pos, v) => Err(::serde::de::Error::custom(format!("invalid last symbol '{}' at position {}", v, pos))),
},
};
if bytes.len() != $size {
Expand Down

0 comments on commit 93fbf34

Please sign in to comment.