message: remove scalar accessors from update buffer; rewrite buffer_read test
diff: @@ -73,7 +73,7 @@ impl<T: AsRef<[u8]>> UpdateBuffer<T> {
  let _ = MaskVectBuffer::new(&self.inner.as_ref()[self.masked_model_offset()..])
  .context("invalid masked model field")?;
  - // Check the length of the masked scalar field
  + // Check the length of the masked scalar field (TODO MaskUnitBuffer)
  let _ = MaskVectBuffer::new(&self.inner.as_ref()[self.masked_scalar_offset()..])
  .context("invalid masked scalar field")?;
  @@ -133,15 +133,6 @@ impl<'a, T: AsRef<[u8]> + ?Sized> UpdateBuffer<&'a T> {
  &self.inner.as_ref()[offset..]
  }
  - /// Gets a slice that starts at the beginning of the masked scalar field.
  - ///
  - /// # Panics
  - /// Accessing the field may panic if the buffer has not been checked before.
  - pub fn masked_scalar(&self) -> &'a [u8] {
  - let offset = self.masked_scalar_offset();
  - &self.inner.as_ref()[offset..]
  - }
  -
  /// Gets a slice that starts at the beginning og the local seed dictionary field.
  ///
  /// # Panics
  @@ -178,15 +169,6 @@ impl<T: AsRef<[u8]> + AsMut<[u8]>> UpdateBuffer<T> {
  &mut self.inner.as_mut()[offset..]
  }
  - /// Gets a mutable slice that starts at the beginning of the masked scalar field.
  - ///
  - /// # Panics
  - /// Accessing the field may panic if the buffer has not been checked before.
  - pub fn masked_scalar_mut(&mut self) -> &mut [u8] {
  - let offset = self.masked_scalar_offset();
  - &mut self.inner.as_mut()[offset..]
  - }
  -
  /// Gets a mutable slice that starts at the beginning of the local seed dictionary field.
  ///
  /// # Panics
  @@ -273,10 +255,7 @@ pub(in crate::message) mod tests_helpers {
  use std::convert::TryFrom;
  use super::*;
  - pub(in crate::message) use crate::mask::object::serialization::{
  - tests::mask_object,
  - vect::tests::{mask_unit, mask_vect},
  - };
  + pub(in crate::message) use crate::mask::object::serialization::tests::mask_object;
  use crate::{crypto::ByteObject, mask::seed::EncryptedMaskSeed, SumParticipantPublicKey};
  pub fn sum_signature() -> (ParticipantTaskSignature, Vec<u8>) {
  @@ -349,10 +328,8 @@ pub(in crate::message) mod tests {
  buffer.update_signature(),
  helpers::update_signature().1.as_slice()
  );
  - let mut expected = helpers::mask_vect().1;
  + let expected = helpers::mask_object().1;
  assert_eq!(&buffer.masked_model()[..expected.len()], &expected[..]);
  - expected = helpers::mask_unit().1;
  - assert_eq!(&buffer.masked_scalar()[..expected.len()], &expected[..]);
  assert_eq!(buffer.local_seed_dict(), &helpers::local_seed_dict().1[..]);
  }
  