File tree 1 file changed +7
-9
lines changed
libraries/rust/common/src
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -192,16 +192,14 @@ impl<'a> PrimaryKey<'a> for &ChannelId {
192
192
impl KeyDeserialize for & ChannelId {
193
193
type Output = ChannelId ;
194
194
195
+
195
196
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
+ }
205
203
}
206
204
207
205
impl < ' a > Prefixer < ' a > for & ChannelId {
You can’t perform that action at this time.
0 commit comments