update syn to v2.0, large update

This commit is contained in:
2023-07-03 00:42:20 +02:00
parent b4f2f3e105
commit 148fc29b95
19 changed files with 325 additions and 230 deletions

View File

@ -1,4 +1,4 @@
use crate::pus::{source_buffer_large_enough, EcssTmError, EcssTmErrorWithSend};
use crate::pus::{source_buffer_large_enough, EcssTmtcError, EcssTmtcErrorWithSend};
use spacepackets::ecss::EcssEnumeration;
use spacepackets::tm::PusTm;
use spacepackets::tm::PusTmSecondaryHeader;
@ -34,7 +34,7 @@ impl EventReporterBase {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.generate_and_send_generic_tm(
buf,
Subservice::TmInfoReport,
@ -52,7 +52,7 @@ impl EventReporterBase {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.generate_and_send_generic_tm(
buf,
Subservice::TmLowSeverityReport,
@ -70,7 +70,7 @@ impl EventReporterBase {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.generate_and_send_generic_tm(
buf,
Subservice::TmMediumSeverityReport,
@ -88,7 +88,7 @@ impl EventReporterBase {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.generate_and_send_generic_tm(
buf,
Subservice::TmHighSeverityReport,
@ -107,11 +107,11 @@ impl EventReporterBase {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
let tm = self.generate_generic_event_tm(buf, subservice, time_stamp, event_id, aux_data)?;
sender
.send_tm(tm)
.map_err(|e| EcssTmErrorWithSend::SendError(e))?;
.map_err(|e| EcssTmtcErrorWithSend::SendError(e))?;
self.msg_count += 1;
Ok(())
}
@ -123,8 +123,8 @@ impl EventReporterBase {
time_stamp: &'a [u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<PusTm, EcssTmError> {
let mut src_data_len = event_id.byte_width();
) -> Result<PusTm, EcssTmtcError> {
let mut src_data_len = event_id.size();
if let Some(aux_data) = aux_data {
src_data_len += aux_data.len();
}
@ -138,8 +138,8 @@ impl EventReporterBase {
Some(time_stamp),
);
let mut current_idx = 0;
event_id.write_to_be_bytes(&mut buf[0..event_id.byte_width()])?;
current_idx += event_id.byte_width();
event_id.write_to_be_bytes(&mut buf[0..event_id.size()])?;
current_idx += event_id.size();
if let Some(aux_data) = aux_data {
buf[current_idx..current_idx + aux_data.len()].copy_from_slice(aux_data);
current_idx += aux_data.len();
@ -178,7 +178,7 @@ mod allocvec {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.reporter.event_info(
self.source_data_buf.as_mut_slice(),
sender,
@ -194,7 +194,7 @@ mod allocvec {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.reporter.event_low_severity(
self.source_data_buf.as_mut_slice(),
sender,
@ -210,7 +210,7 @@ mod allocvec {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.reporter.event_medium_severity(
self.source_data_buf.as_mut_slice(),
sender,
@ -226,7 +226,7 @@ mod allocvec {
time_stamp: &[u8],
event_id: impl EcssEnumeration,
aux_data: Option<&[u8]>,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.reporter.event_high_severity(
self.source_data_buf.as_mut_slice(),
sender,
@ -413,7 +413,7 @@ mod tests {
let err = reporter.event_info(sender, &time_stamp_empty, event, None);
assert!(err.is_err());
let err = err.unwrap_err();
if let EcssTmErrorWithSend::EcssTmError(EcssTmError::ByteConversionError(
if let EcssTmErrorWithSend::EcssTmError(EcssTmtcError::ByteConversionError(
ByteConversionError::ToSliceTooSmall(missmatch),
)) = err
{

View File

@ -11,9 +11,9 @@ use hashbrown::HashSet;
#[cfg(feature = "alloc")]
pub use crate::pus::event::EventReporter;
use crate::pus::verification::{TcStateStarted, VerificationToken};
use crate::pus::EcssTmErrorWithSend;
#[cfg(feature = "alloc")]
use crate::pus::EcssTmSenderCore;
use crate::pus::EcssTmtcErrorWithSend;
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
pub use alloc_mod::*;
@ -96,13 +96,13 @@ pub struct EventRequestWithToken<Event: GenericEvent = EventU32> {
#[derive(Debug)]
pub enum EventManError<SenderE> {
EcssTmError(EcssTmErrorWithSend<SenderE>),
EcssTmtcError(EcssTmtcErrorWithSend<SenderE>),
SeverityMissmatch(Severity, Severity),
}
impl<SenderE> From<EcssTmErrorWithSend<SenderE>> for EventManError<SenderE> {
fn from(v: EcssTmErrorWithSend<SenderE>) -> Self {
Self::EcssTmError(v)
impl<SenderE> From<EcssTmtcErrorWithSend<SenderE>> for EventManError<SenderE> {
fn from(v: EcssTmtcErrorWithSend<SenderE>) -> Self {
Self::EcssTmtcError(v)
}
}

View File

@ -4,6 +4,7 @@ use downcast_rs::{impl_downcast, Downcast};
#[cfg(feature = "alloc")]
use dyn_clone::DynClone;
use spacepackets::ecss::PusError;
use spacepackets::tc::PusTc;
use spacepackets::time::TimestampError;
use spacepackets::tm::PusTm;
use spacepackets::{ByteConversionError, SizeMissmatch};
@ -24,21 +25,21 @@ use crate::SenderId;
pub use std_mod::*;
#[derive(Debug, Clone)]
pub enum EcssTmErrorWithSend<E> {
/// Errors related to sending the telemetry to a TM recipient
pub enum EcssTmtcErrorWithSend<E> {
/// Errors related to sending the telemetry to a TMTC recipient
SendError(E),
EcssTmError(EcssTmError),
EcssTmtcError(EcssTmtcError),
}
impl<E> From<EcssTmError> for EcssTmErrorWithSend<E> {
fn from(value: EcssTmError) -> Self {
Self::EcssTmError(value)
impl<E> From<EcssTmtcError> for EcssTmtcErrorWithSend<E> {
fn from(value: EcssTmtcError) -> Self {
Self::EcssTmtcError(value)
}
}
/// Generic error type for PUS TM handling.
#[derive(Debug, Clone)]
pub enum EcssTmError {
pub enum EcssTmtcError {
/// Errors related to the time stamp format of the telemetry
TimestampError(TimestampError),
/// Errors related to byte conversion, for example insufficient buffer size for given data
@ -47,30 +48,41 @@ pub enum EcssTmError {
PusError(PusError),
}
impl From<PusError> for EcssTmError {
impl From<PusError> for EcssTmtcError {
fn from(e: PusError) -> Self {
EcssTmError::PusError(e)
EcssTmtcError::PusError(e)
}
}
impl From<ByteConversionError> for EcssTmError {
impl From<ByteConversionError> for EcssTmtcError {
fn from(e: ByteConversionError) -> Self {
EcssTmError::ByteConversionError(e)
EcssTmtcError::ByteConversionError(e)
}
}
pub trait EcssSender: Send {
/// Each sender can have an ID associated with it
fn id(&self) -> SenderId;
fn name(&self) -> &'static str {
"unset"
}
}
/// Generic trait for a user supplied sender object.
///
/// This sender object is responsible for sending PUS telemetry to a TM sink.
pub trait EcssTmSenderCore: EcssSender {
type Error;
fn send_tm(&mut self, tm: PusTm) -> Result<(), Self::Error>;
}
/// Generic trait for a user supplied sender object.
///
/// This sender object is responsible for sending telemetry to a TM sink.
pub trait EcssTmSenderCore: Send {
/// This sender object is responsible for sending PUS telecommands to a TC recipient.
pub trait EcssTcSenderCore: EcssSender {
type Error;
/// Each sender can have an ID associated with it
fn id(&self) -> SenderId;
fn send_tm(&mut self, tm: PusTm) -> Result<(), Self::Error>;
fn name(&self) -> &'static str {
"unset"
}
fn send_tc(&mut self, tc: PusTc) -> Result<(), Self::Error>;
}
#[cfg(feature = "alloc")]
@ -96,15 +108,36 @@ mod alloc_mod {
dyn_clone::clone_trait_object!(<T> EcssTmSender<Error=T>);
impl_downcast!(EcssTmSender assoc Error);
/// Extension trait for [EcssTcSenderCore].
///
/// It provides additional functionality, for example by implementing the [Downcast] trait
/// and the [DynClone] trait.
///
/// [Downcast] is implemented to allow passing the sender as a boxed trait object and still
/// retrieve the concrete type at a later point.
///
/// [DynClone] allows cloning the trait object as long as the boxed object implements
/// [Clone].
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
pub trait EcssTcSender: EcssTcSenderCore + Downcast + DynClone {}
/// Blanket implementation for all types which implement [EcssTcSenderCore] and are clonable.
impl<T> EcssTcSender for T where T: EcssTcSenderCore + Clone + 'static {}
dyn_clone::clone_trait_object!(<T> EcssTcSender<Error=T>);
impl_downcast!(EcssTcSender assoc Error);
}
#[cfg(feature = "std")]
pub mod std_mod {
use crate::pool::{ShareablePoolProvider, SharedPool, StoreAddr, StoreError};
use crate::pus::EcssTmSenderCore;
use crate::pus::{EcssSender, EcssTcSenderCore, EcssTmSenderCore};
use crate::SenderId;
use alloc::vec::Vec;
use spacepackets::ecss::PusError;
use spacepackets::ecss::{PusError, SerializablePusPacket};
use spacepackets::tc::PusTc;
use spacepackets::tm::PusTm;
use std::sync::mpsc::SendError;
use std::sync::{mpsc, RwLockWriteGuard};
@ -135,7 +168,7 @@ pub mod std_mod {
}
#[derive(Clone)]
pub struct MpscTmInStoreSender {
pub struct MpscTmtcInStoreSender {
id: SenderId,
name: &'static str,
store_helper: SharedPool,
@ -143,13 +176,19 @@ pub mod std_mod {
pub ignore_poison_errors: bool,
}
impl EcssTmSenderCore for MpscTmInStoreSender {
type Error = MpscPusInStoreSendError;
impl EcssSender for MpscTmtcInStoreSender {
fn id(&self) -> SenderId {
self.id
}
fn name(&self) -> &'static str {
self.name
}
}
impl EcssTmSenderCore for MpscTmtcInStoreSender {
type Error = MpscPusInStoreSendError;
fn send_tm(&mut self, tm: PusTm) -> Result<(), Self::Error> {
let operation = |mut store: RwLockWriteGuard<ShareablePoolProvider>| {
let (addr, slice) = store.free_element(tm.len_packed())?;
@ -168,13 +207,32 @@ pub mod std_mod {
}
}
}
}
fn name(&self) -> &'static str {
self.name
impl EcssTcSenderCore for MpscTmtcInStoreSender {
type Error = MpscPusInStoreSendError;
fn send_tc(&mut self, tc: PusTc) -> Result<(), Self::Error> {
let operation = |mut store: RwLockWriteGuard<ShareablePoolProvider>| {
let (addr, slice) = store.free_element(tc.len_packed())?;
tc.write_to_bytes(slice)?;
self.sender.send(addr)?;
Ok(())
};
match self.store_helper.write() {
Ok(pool) => operation(pool),
Err(e) => {
if self.ignore_poison_errors {
operation(e.into_inner())
} else {
Err(MpscPusInStoreSendError::LockError)
}
}
}
}
}
impl MpscTmInStoreSender {
impl MpscTmtcInStoreSender {
pub fn new(
id: SenderId,
name: &'static str,
@ -209,11 +267,18 @@ pub mod std_mod {
Self { id, sender, name }
}
}
impl EcssTmSenderCore for MpscTmAsVecSender {
type Error = MpscAsVecSenderError;
impl EcssSender for MpscTmAsVecSender {
fn id(&self) -> SenderId {
self.id
}
fn name(&self) -> &'static str {
self.name
}
}
impl EcssTmSenderCore for MpscTmAsVecSender {
type Error = MpscAsVecSenderError;
fn send_tm(&mut self, tm: PusTm) -> Result<(), Self::Error> {
let mut vec = Vec::new();
@ -224,10 +289,6 @@ pub mod std_mod {
.map_err(MpscAsVecSenderError::SendError)?;
Ok(())
}
fn name(&self) -> &'static str {
self.name
}
}
}
@ -237,9 +298,9 @@ pub enum GenericTcCheckError {
InvalidSubservice,
}
pub(crate) fn source_buffer_large_enough(cap: usize, len: usize) -> Result<(), EcssTmError> {
pub(crate) fn source_buffer_large_enough(cap: usize, len: usize) -> Result<(), EcssTmtcError> {
if len > cap {
return Err(EcssTmError::ByteConversionError(
return Err(EcssTmtcError::ByteConversionError(
ByteConversionError::ToSliceTooSmall(SizeMissmatch {
found: cap,
expected: len,

View File

@ -73,7 +73,7 @@
//! for the verification module contains examples how this module could be used in a more complex
//! context involving multiple threads
use crate::pus::{
source_buffer_large_enough, EcssTmError, EcssTmErrorWithSend, EcssTmSenderCore,
source_buffer_large_enough, EcssTmSenderCore, EcssTmtcError, EcssTmtcErrorWithSend,
GenericTcCheckError,
};
use core::fmt::{Debug, Display, Formatter};
@ -179,12 +179,12 @@ impl RequestId {
/// re-trying the operation at a later point.
#[derive(Debug, Clone)]
pub struct VerificationOrSendErrorWithToken<E, T>(
pub EcssTmErrorWithSend<E>,
pub EcssTmtcErrorWithSend<E>,
pub VerificationToken<T>,
);
#[derive(Debug, Clone)]
pub struct VerificationErrorWithToken<T>(pub EcssTmError, pub VerificationToken<T>);
pub struct VerificationErrorWithToken<T>(pub EcssTmtcError, pub VerificationToken<T>);
impl<E, T> From<VerificationErrorWithToken<T>> for VerificationOrSendErrorWithToken<E, T> {
fn from(value: VerificationErrorWithToken<T>) -> Self {
@ -543,7 +543,7 @@ impl VerificationReporterCore {
.send_tm(sendable.pus_tm.take().unwrap())
.map_err(|e| {
VerificationOrSendErrorWithToken(
EcssTmErrorWithSend::SendError(e),
EcssTmtcErrorWithSend::SendError(e),
sendable.token.unwrap(),
)
})?;
@ -561,7 +561,7 @@ impl VerificationReporterCore {
.send_tm(sendable.pus_tm.take().unwrap())
.map_err(|e| {
VerificationOrSendErrorWithToken(
EcssTmErrorWithSend::SendError(e),
EcssTmtcErrorWithSend::SendError(e),
sendable.token.unwrap(),
)
})?;
@ -630,7 +630,7 @@ impl VerificationReporterCore {
.send_tm(sendable.pus_tm.take().unwrap())
.map_err(|e| {
VerificationOrSendErrorWithToken(
EcssTmErrorWithSend::SendError(e),
EcssTmtcErrorWithSend::SendError(e),
sendable.token.unwrap(),
)
})?;
@ -674,7 +674,7 @@ impl VerificationReporterCore {
.send_tm(sendable.pus_tm.take().unwrap())
.map_err(|e| {
VerificationOrSendErrorWithToken(
EcssTmErrorWithSend::SendError(e),
EcssTmtcErrorWithSend::SendError(e),
sendable.token.unwrap(),
)
})?;
@ -693,7 +693,7 @@ impl VerificationReporterCore {
msg_counter: &(impl SequenceCountProviderCore<u16> + ?Sized),
time_stamp: Option<&'src_data [u8]>,
step: impl EcssEnumeration,
) -> Result<VerificationSendable<'src_data, TcStateStarted, VerifSuccess>, EcssTmError> {
) -> Result<VerificationSendable<'src_data, TcStateStarted, VerifSuccess>, EcssTmtcError> {
Ok(VerificationSendable::new_no_token(
self.create_pus_verif_success_tm(
src_data_buf,
@ -799,7 +799,7 @@ impl VerificationReporterCore {
.send_tm(sendable.pus_tm.take().unwrap())
.map_err(|e| {
VerificationOrSendErrorWithToken(
EcssTmErrorWithSend::SendError(e),
EcssTmtcErrorWithSend::SendError(e),
sendable.token.unwrap(),
)
})?;
@ -818,7 +818,7 @@ impl VerificationReporterCore {
.send_tm(sendable.pus_tm.take().unwrap())
.map_err(|e| {
VerificationOrSendErrorWithToken(
EcssTmErrorWithSend::SendError(e),
EcssTmtcErrorWithSend::SendError(e),
sendable.token.unwrap(),
)
})?;
@ -837,10 +837,10 @@ impl VerificationReporterCore {
req_id: &RequestId,
time_stamp: Option<&'src_data [u8]>,
step: Option<&(impl EcssEnumeration + ?Sized)>,
) -> Result<PusTm<'src_data>, EcssTmError> {
) -> Result<PusTm<'src_data>, EcssTmtcError> {
let mut source_data_len = size_of::<u32>();
if let Some(step) = step {
source_data_len += step.byte_width();
source_data_len += step.size();
}
source_buffer_large_enough(src_data_buf.len(), source_data_len)?;
let mut idx = 0;
@ -848,7 +848,7 @@ impl VerificationReporterCore {
idx += RequestId::SIZE_AS_BYTES;
if let Some(step) = step {
// Size check was done beforehand
step.write_to_be_bytes(&mut src_data_buf[idx..idx + step.byte_width()])
step.write_to_be_bytes(&mut src_data_buf[idx..idx + step.size()])
.unwrap();
}
let mut sp_header = SpHeader::tm_unseg(self.apid(), seq_count, 0).unwrap();
@ -873,11 +873,11 @@ impl VerificationReporterCore {
req_id: &RequestId,
step: Option<&(impl EcssEnumeration + ?Sized)>,
params: &FailParams<'src_data, '_>,
) -> Result<PusTm<'src_data>, EcssTmError> {
) -> Result<PusTm<'src_data>, EcssTmtcError> {
let mut idx = 0;
let mut source_data_len = RequestId::SIZE_AS_BYTES + params.failure_code.byte_width();
let mut source_data_len = RequestId::SIZE_AS_BYTES + params.failure_code.size();
if let Some(step) = step {
source_data_len += step.byte_width();
source_data_len += step.size();
}
if let Some(failure_data) = params.failure_data {
source_data_len += failure_data.len();
@ -887,14 +887,14 @@ impl VerificationReporterCore {
idx += RequestId::SIZE_AS_BYTES;
if let Some(step) = step {
// Size check done beforehand
step.write_to_be_bytes(&mut src_data_buf[idx..idx + step.byte_width()])
step.write_to_be_bytes(&mut src_data_buf[idx..idx + step.size()])
.unwrap();
idx += step.byte_width();
idx += step.size();
}
params
.failure_code
.write_to_be_bytes(&mut src_data_buf[idx..idx + params.failure_code.byte_width()])?;
idx += params.failure_code.byte_width();
.write_to_be_bytes(&mut src_data_buf[idx..idx + params.failure_code.size()])?;
idx += params.failure_code.size();
if let Some(failure_data) = params.failure_data {
src_data_buf[idx..idx + failure_data.len()].copy_from_slice(failure_data);
}
@ -1121,7 +1121,7 @@ mod alloc_mod {
sender: &mut (impl EcssTmSenderCore<Error = E> + ?Sized),
time_stamp: Option<&[u8]>,
step: impl EcssEnumeration,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
let sendable = self.reporter.step_success(
self.source_data_buf.as_mut_slice(),
token,
@ -1298,7 +1298,7 @@ mod alloc_mod {
token: &VerificationToken<TcStateStarted>,
time_stamp: Option<&[u8]>,
step: impl EcssEnumeration,
) -> Result<(), EcssTmErrorWithSend<E>> {
) -> Result<(), EcssTmtcErrorWithSend<E>> {
self.reporter
.step_success(token, self.sender.as_mut(), time_stamp, step)
}
@ -1337,9 +1337,10 @@ mod stdmod {
use super::alloc_mod::VerificationReporterWithSender;
use super::*;
use crate::pool::{ShareablePoolProvider, SharedPool, StoreAddr};
use crate::pus::MpscPusInStoreSendError;
use crate::pus::{EcssSender, MpscPusInStoreSendError};
use crate::SenderId;
use delegate::delegate;
use spacepackets::ecss::SerializablePusPacket;
use spacepackets::tm::PusTm;
use std::sync::{mpsc, Arc, Mutex, RwLockWriteGuard};
@ -1400,14 +1401,22 @@ mod stdmod {
}
}
//noinspection RsTraitImplementation
impl EcssSender for MpscVerifSender {
delegate!(
to self.base {
fn id(&self) -> SenderId;
fn name(&self) -> &'static str;
}
);
}
//noinspection RsTraitImplementation
impl EcssTmSenderCore for MpscVerifSender {
type Error = MpscPusInStoreSendError;
delegate!(
to self.base {
fn id(&self) -> SenderId;
fn name(&self) -> &'static str;
fn send_tm(&mut self, tm: PusTm) -> Result<(), Self::Error>;
}
);
@ -1441,6 +1450,17 @@ mod stdmod {
}
}
//noinspection RsTraitImplementation
#[cfg(feature = "crossbeam")]
impl EcssSender for CrossbeamVerifSender {
delegate!(
to self.base {
fn id(&self) -> SenderId;
fn name(&self) -> &'static str;
}
);
}
//noinspection RsTraitImplementation
#[cfg(feature = "crossbeam")]
impl EcssTmSenderCore for CrossbeamVerifSender {
@ -1448,19 +1468,21 @@ mod stdmod {
delegate!(
to self.base {
fn id(&self) -> SenderId;
fn name(&self) -> &'static str;
fn send_tm(&mut self, tm: PusTm) -> Result<(), Self::Error>;
}
);
}
impl<S: SendBackend + Clone + 'static> EcssTmSenderCore for StdSenderBase<S> {
type Error = MpscPusInStoreSendError;
impl<S: SendBackend + Clone + 'static> EcssSender for StdSenderBase<S> {
fn id(&self) -> SenderId {
self.id
}
fn name(&self) -> &'static str {
self.name
}
}
impl<S: SendBackend + Clone + 'static> EcssTmSenderCore for StdSenderBase<S> {
type Error = MpscPusInStoreSendError;
fn send_tm(&mut self, tm: PusTm) -> Result<(), Self::Error> {
let operation = |mut mg: RwLockWriteGuard<ShareablePoolProvider>| {
@ -1484,10 +1506,6 @@ mod stdmod {
}
}
}
fn name(&self) -> &'static str {
self.name
}
}
}
@ -1799,7 +1817,7 @@ mod tests {
let err_with_token = res.unwrap_err();
assert_eq!(err_with_token.1, tok);
match err_with_token.0 {
EcssTmErrorWithSend::EcssTmError(EcssTmError::ByteConversionError(e)) => match e {
EcssTmErrorWithSend::EcssTmError(EcssTmtcError::ByteConversionError(e)) => match e {
ByteConversionError::ToSliceTooSmall(missmatch) => {
assert_eq!(
missmatch.expected,