Skip to content

Commit

Permalink
LoopbackInterface → Loopback.
Browse files Browse the repository at this point in the history
whitequark committed Jul 14, 2017
1 parent 8ada283 commit 9a4efcd
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/phy/loopback.rs
Original file line number Diff line number Diff line change
@@ -16,19 +16,19 @@ use super::Device;

/// A loopback interface.
#[derive(Debug)]
pub struct LoopbackInterface(Rc<RefCell<VecDeque<Vec<u8>>>>);
pub struct Loopback(Rc<RefCell<VecDeque<Vec<u8>>>>);

impl LoopbackInterface {
impl Loopback {
/// Creates a loopback interface.
///
/// Every packet transmitted through this interface will be received through it
/// in FIFO order.
pub fn new() -> LoopbackInterface {
LoopbackInterface(Rc::new(RefCell::new(VecDeque::new())))
pub fn new() -> Loopback {
Loopback(Rc::new(RefCell::new(VecDeque::new())))
}
}

impl Device for LoopbackInterface {
impl Device for Loopback {
type RxBuffer = Vec<u8>;
type TxBuffer = TxBuffer;

2 changes: 1 addition & 1 deletion src/phy/mod.rs
Original file line number Diff line number Diff line change
@@ -118,7 +118,7 @@ mod tap_interface;
pub use self::tracer::Tracer;
pub use self::fault_injector::FaultInjector;
#[cfg(any(feature = "std", feature = "collections"))]
pub use self::loopback::LoopbackInterface;
pub use self::loopback::Loopback;
#[cfg(any(feature = "raw_socket"))]
pub use self::raw_socket::RawSocket;
#[cfg(all(feature = "tap_interface", target_os = "linux"))]

0 comments on commit 9a4efcd

Please sign in to comment.