File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ impl UpperHex for Flake {
8686
8787impl Display for Flake {
8888 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
89- f. write_str ( & BASE64 . encode ( & self . 0 . to_be_bytes ( ) ) )
89+ f. write_str ( & BASE64 . encode ( & self . 0 . to_le_bytes ( ) ) )
9090 }
9191}
9292
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ impl<'de> Visitor<'de> for FlakeVisitor {
4747 for ( i, byte) in decoded_bytes. iter ( ) . take ( bytes. len ( ) ) . enumerate ( ) {
4848 bytes[ i] = * byte;
4949 }
50- let value = u128:: from_be_bytes ( bytes) ;
50+ let value = u128:: from_le_bytes ( bytes) ;
5151 Ok ( Flake :: new ( value) )
5252 }
5353
@@ -62,5 +62,5 @@ impl<'de> Visitor<'de> for FlakeVisitor {
6262#[ test]
6363fn test_serde ( ) {
6464 let id = Flake :: new ( 29866156537351941961353716432896 ) ;
65- assert_tokens ( & id, & [ Token :: String ( "AAABePbBqL900Cue9CYAAA ==" ) ] ) ;
65+ assert_tokens ( & id, & [ Token :: String ( "AAAm9J4r0HS/qMH2eAEAAA ==" ) ] ) ;
6666}
You can’t perform that action at this time.
0 commit comments