Skip to content

Commit f783217

Browse files
committed
fix: fix unit test
1 parent 2e8e2ce commit f783217

File tree

1 file changed

+7
-9
lines changed
  • libraries/rust/common/src

1 file changed

+7
-9
lines changed

libraries/rust/common/src/lib.rs

+7-9
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,14 @@ impl<'a> PrimaryKey<'a> for &ChannelId {
192192
impl KeyDeserialize for &ChannelId {
193193
type Output = ChannelId;
194194

195+
195196
fn from_vec(value: Vec<u8>) -> StdResult<Self::Output> {
196-
todo!()
197-
}
198-
// fn from_vec(value: Vec<u8>) -> Result<Self::Output,cosmwasm_std::errors::std_error::StdError> {
199-
// let result = String::from_utf8(value)
200-
// .map_err(StdError::invalid_utf8)
201-
// .unwrap();
202-
// let chan_id = ChannelId::from_str(&result).unwrap();
203-
// Ok(chan_id)
204-
// }
197+
let result = String::from_utf8(value)
198+
.map_err(StdError::invalid_utf8)
199+
.unwrap();
200+
let chan_id = ChannelId::from_str(&result).unwrap();
201+
Ok(chan_id)
202+
}
205203
}
206204

207205
impl<'a> Prefixer<'a> for &ChannelId {

0 commit comments

Comments
 (0)