about summary refs log tree commit diff
path: root/compiler/rustc_serialize/src/serialize.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-05-01 16:06:43 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-05-04 13:11:51 +1000
commit58002faca0ac45589c6092030a5459eae9720e3d (patch)
tree1c624a242a01eee5d66bd00278df4e7e66f9f5b0 /compiler/rustc_serialize/src/serialize.rs
parentb71ce293e843f17e27bd2868981dead23691019e (diff)
downloadrust-58002faca0ac45589c6092030a5459eae9720e3d.tar.gz
rust-58002faca0ac45589c6092030a5459eae9720e3d.zip
Reorder some `MemDecoder` methods.
So they match the order in the `Decoder` trait.
Diffstat (limited to 'compiler/rustc_serialize/src/serialize.rs')
-rw-r--r--compiler/rustc_serialize/src/serialize.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs
index 4abbd7f3c59..06166cabc18 100644
--- a/compiler/rustc_serialize/src/serialize.rs
+++ b/compiler/rustc_serialize/src/serialize.rs
@@ -31,13 +31,13 @@ const STR_SENTINEL: u8 = 0xC1;
 /// really makes sense to store floating-point values at all.
 /// (If you need it, revert <https://github.com/rust-lang/rust/pull/109984>.)
 pub trait Encoder {
-    // Primitive types:
     fn emit_usize(&mut self, v: usize);
     fn emit_u128(&mut self, v: u128);
     fn emit_u64(&mut self, v: u64);
     fn emit_u32(&mut self, v: u32);
     fn emit_u16(&mut self, v: u16);
     fn emit_u8(&mut self, v: u8);
+
     fn emit_isize(&mut self, v: isize);
     fn emit_i128(&mut self, v: i128);
     fn emit_i64(&mut self, v: i64);
@@ -89,13 +89,13 @@ pub trait Encoder {
 /// really makes sense to store floating-point values at all.
 /// (If you need it, revert <https://github.com/rust-lang/rust/pull/109984>.)
 pub trait Decoder {
-    // Primitive types:
     fn read_usize(&mut self) -> usize;
     fn read_u128(&mut self) -> u128;
     fn read_u64(&mut self) -> u64;
     fn read_u32(&mut self) -> u32;
     fn read_u16(&mut self) -> u16;
     fn read_u8(&mut self) -> u8;
+
     fn read_isize(&mut self) -> isize;
     fn read_i128(&mut self) -> i128;
     fn read_i64(&mut self) -> i64;