We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4b6216 commit 60cb9c0Copy full SHA for 60cb9c0
src/libextra/serialize.rs
@@ -662,6 +662,19 @@ impl<
662
}
663
664
665
+impl<
666
+ S: Encoder,
667
+ T: Encodable<S>
668
+> Encodable<S> for DList<T> {
669
+ fn encode(&self, s: &mut S) {
670
+ do s.emit_seq(self.len()) |s| {
671
+ for self.iter().enumerate().advance |(i, e)| {
672
+ s.emit_seq_elt(i, |s| e.encode(s));
673
+ }
674
675
676
+}
677
+
678
impl<D:Decoder,T:Decodable<D>> Decodable<D> for DList<T> {
679
fn decode(d: &mut D) -> DList<T> {
680
let mut list = DList::new();
0 commit comments