Fix misleading comments on write_be and read_be.
This commit is contained in:
parent
b971bdedda
commit
541fda7580
|
@ -385,8 +385,7 @@ pub trait PrimeFieldRepr: Sized +
|
||||||
/// Performs a leftwise bitshift of this number by some amount.
|
/// Performs a leftwise bitshift of this number by some amount.
|
||||||
fn shl(&mut self, amt: u32);
|
fn shl(&mut self, amt: u32);
|
||||||
|
|
||||||
/// Writes this `PrimeFieldRepr` as a big endian integer. Always writes
|
/// Writes this `PrimeFieldRepr` as a big endian integer.
|
||||||
/// `(num_bits` / 8) bytes.
|
|
||||||
fn write_be<W: Write>(&self, mut writer: W) -> io::Result<()> {
|
fn write_be<W: Write>(&self, mut writer: W) -> io::Result<()> {
|
||||||
use byteorder::{WriteBytesExt, BigEndian};
|
use byteorder::{WriteBytesExt, BigEndian};
|
||||||
|
|
||||||
|
@ -397,8 +396,7 @@ pub trait PrimeFieldRepr: Sized +
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Reads a big endian integer occupying (`num_bits` / 8) bytes into this
|
/// Reads a big endian integer into this representation.
|
||||||
/// representation.
|
|
||||||
fn read_be<R: Read>(&mut self, mut reader: R) -> io::Result<()> {
|
fn read_be<R: Read>(&mut self, mut reader: R) -> io::Result<()> {
|
||||||
use byteorder::{ReadBytesExt, BigEndian};
|
use byteorder::{ReadBytesExt, BigEndian};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue