Skip to content

Commit

Permalink
Fix regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamwaffles committed Jul 21, 2024
1 parent bca2605 commit c85912f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub use ethercrab_wire::{
EtherCrabWireRead, EtherCrabWireReadSized, EtherCrabWireReadWrite, EtherCrabWireSized,
EtherCrabWireWrite, EtherCrabWireWriteSized,
};
pub use pdu_loop::{PduLoop, PduRx, PduStorage, PduTx, SendableFrame};
pub use pdu_loop::{PduLoop, PduRx, PduStorage, PduTx, ReceiveAction, SendableFrame};
pub use register::{DcSupport, RegisterAddress};
pub use slave::{DcSync, Slave, SlaveIdentity, SlavePdi, SlaveRef};
pub use slave_group::{GroupId, GroupSlaveIterator, SlaveGroup, SlaveGroupHandle};
Expand Down
8 changes: 4 additions & 4 deletions tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ethercrab::{
error::Error,
internals::{EthercatFrameHeader, PduHeader},
std::tx_rx_task,
PduRx, PduTx,
PduRx, PduTx, ReceiveAction,
};
use ethercrab_wire::EtherCrabWireRead;
use pcap_file::pcapng::{Block, PcapNgReader};
Expand Down Expand Up @@ -81,7 +81,7 @@ struct DummyTxRxFut<'a> {
}

impl Future for DummyTxRxFut<'_> {
type Output = Result<(), Error>;
type Output = Result<ReceiveAction, Error>;

fn poll(mut self: Pin<&mut Self>, ctx: &mut core::task::Context<'_>) -> Poll<Self::Output> {
self.tx.replace_waker(ctx.waker());
Expand Down Expand Up @@ -127,7 +127,7 @@ impl Future for DummyTxRxFut<'_> {
.pop_front()
.expect("Not enough packets for this preamble");

self.rx.receive_frame(expected.as_ref()).expect("Frame RX")
self.rx.receive_frame(expected.as_ref()).expect("Frame RX");
}

Poll::Pending
Expand All @@ -139,7 +139,7 @@ pub fn dummy_tx_rx_task(
capture_file_path: &str,
pdu_tx: PduTx<'static>,
pdu_rx: PduRx<'static>,
) -> Result<impl Future<Output = Result<(), Error>>, std::io::Error> {
) -> Result<impl Future<Output = Result<ReceiveAction, Error>>, std::io::Error> {
// let file_in = File::open(capture_file_path).expect("Error opening file");
let file_in2 = File::open(capture_file_path).expect("Error opening file");
// let pcapng_reader = PcapNgReader::new(file_in).expect("Failed to init PCAP reader");
Expand Down

0 comments on commit c85912f

Please sign in to comment.