Skip to content

Commit c3a39d8

Browse files
author
Ivo Georgiev
committed
validator: remove an unnecessary map_err which actually deleted err information
1 parent df55e1a commit c3a39d8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

primitives/src/validator.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ impl TryFrom<&str> for ValidatorId {
6565
impl TryFrom<&String> for ValidatorId {
6666
type Error = DomainError;
6767
fn try_from(value: &String) -> Result<Self, Self::Error> {
68-
ValidatorId::try_from(value.as_str()).map_err(|_| {
69-
DomainError::InvalidArgument("Failed to deserialize validator id".to_string())
70-
})
68+
ValidatorId::try_from(value.as_str())
7169
}
7270
}
7371

0 commit comments

Comments
 (0)