From 46c3ab6d1a3ff017e7209309b01f3bc88d54d7f0 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 1 Nov 2024 19:09:17 +0100 Subject: [PATCH] Expose DfuASync/DfuSync as type alias for more ergonomic usage --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e667451..864193d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,8 +6,8 @@ use dfu_core::{ use nusb::transfer::{Control, ControlIn, ControlOut, ControlType, Recipient, TransferError}; use thiserror::Error; -pub use dfu_core::asynchronous::DfuASync; -pub use dfu_core::sync::DfuSync; +pub type DfuASync = dfu_core::asynchronous::DfuASync; +pub type DfuSync = dfu_core::sync::DfuSync; #[derive(Debug, Error)] pub enum Error { @@ -72,12 +72,12 @@ impl DfuNusb { } /// Wrap device in an *async* dfu helper - pub fn into_async_dfu(self) -> DfuASync { + pub fn into_async_dfu(self) -> DfuASync { DfuASync::new(self) } /// Wrap device in an *sync* dfu helper - pub fn into_sync_dfu(self) -> DfuSync { + pub fn into_sync_dfu(self) -> DfuSync { DfuSync::new(self) } }