File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- //! Implemements encoding/decoding for Mulsi
1+ //! Implements encoding/decoding for Musli
22
33use musli_core:: {
44 mode:: { Binary , Text } ,
@@ -17,7 +17,7 @@ impl Encode<Binary> for Ulid {
1717 #[ inline]
1818 fn encode < E > ( & self , encoder : E ) -> Result < ( ) , E :: Error >
1919 where
20- E : Encoder ,
20+ E : Encoder < Mode = Binary > ,
2121 {
2222 encoder. encode_array ( & self . to_bytes ( ) )
2323 }
@@ -38,7 +38,7 @@ impl Encode<Text> for Ulid {
3838 #[ inline]
3939 fn encode < E > ( & self , encoder : E ) -> Result < ( ) , E :: Error >
4040 where
41- E : Encoder ,
41+ E : Encoder < Mode = Text > ,
4242 {
4343 encoder. collect_string ( self )
4444 }
6060 #[ inline]
6161 fn decode < D > ( decoder : D ) -> Result < Self , D :: Error >
6262 where
63- D : Decoder < ' de > ,
63+ D : Decoder < ' de , Mode = Binary > ,
6464 {
6565 decoder. decode_array :: < 16 > ( ) . map ( Ulid :: from)
6666 }
7777 #[ inline]
7878 fn decode < D > ( decoder : D ) -> Result < Self , D :: Error >
7979 where
80- D : Decoder < ' de > ,
80+ D : Decoder < ' de , Mode = Text > ,
8181 {
8282 let cx = decoder. cx ( ) ;
8383 decoder. decode_unsized ( |string : & str | Ulid :: from_string ( string) . map_err ( cx. map ( ) ) )
You can’t perform that action at this time.
0 commit comments