File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
branches/auto/src/libserialize Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
13
13
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
14
14
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
15
15
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16
- refs/heads/auto: be12c9f753fa742dd76127a600ba9f2447d19b39
16
+ refs/heads/auto: d2cfd543f764c4a3bab9149fe54233c4aa20e6d5
17
17
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
18
18
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
19
19
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
Original file line number Diff line number Diff line change 14
14
Core encoding and decoding interfaces.
15
15
*/
16
16
17
+ use std:: path;
17
18
use std:: rc:: Rc ;
18
19
use std:: vec;
19
20
use std:: vec_ng:: Vec ;
@@ -625,6 +626,32 @@ impl<
625
626
}
626
627
}
627
628
629
+ impl < E : Encoder > Encodable < E > for path:: posix:: Path {
630
+ fn encode ( & self , e : & mut E ) {
631
+ self . as_vec ( ) . encode ( e)
632
+ }
633
+ }
634
+
635
+ impl < D : Decoder > Decodable < D > for path:: posix:: Path {
636
+ fn decode ( d : & mut D ) -> path:: posix:: Path {
637
+ let bytes: ~[ u8 ] = Decodable :: decode ( d) ;
638
+ path:: posix:: Path :: new ( bytes)
639
+ }
640
+ }
641
+
642
+ impl < E : Encoder > Encodable < E > for path:: windows:: Path {
643
+ fn encode ( & self , e : & mut E ) {
644
+ self . as_vec ( ) . encode ( e)
645
+ }
646
+ }
647
+
648
+ impl < D : Decoder > Decodable < D > for path:: windows:: Path {
649
+ fn decode ( d : & mut D ) -> path:: windows:: Path {
650
+ let bytes: ~[ u8 ] = Decodable :: decode ( d) ;
651
+ path:: windows:: Path :: new ( bytes)
652
+ }
653
+ }
654
+
628
655
// ___________________________________________________________________________
629
656
// Helper routines
630
657
//
You can’t perform that action at this time.
0 commit comments