Remove gratuitous NoDmaMarker.

This commit is contained in:
Bob McWhirter 2021-07-14 14:37:42 -04:00
parent 38b1359c40
commit 43cb8de434
2 changed files with 2 additions and 9 deletions

View file

@ -21,12 +21,8 @@ pub trait ReadDma<T> {
T: 'a;
}
pub trait NoDmaMarker {}
pub struct NoDma;
impl NoDmaMarker for NoDma {}
unsafe impl Unborrow for NoDma {
type Target = NoDma;

View file

@ -10,7 +10,6 @@ use core::future::Future;
use futures::TryFutureExt;
use crate::dma_traits::NoDma;
use crate::dma_traits::NoDmaMarker;
#[allow(dead_code)]
pub struct Uart<'d, T: Instance, TxDma = NoDma, RxDma = NoDma> {
@ -114,10 +113,8 @@ impl<'d, T: Instance, TxDma, RxDma> Uart<'d, T, TxDma, RxDma> {
}
}
impl<'d, T: Instance, TxDma, RxDma> embedded_hal::blocking::serial::Write<u8>
for Uart<'d, T, TxDma, RxDma>
where
TxDma: NoDmaMarker,
impl<'d, T: Instance, RxDma> embedded_hal::blocking::serial::Write<u8>
for Uart<'d, T, NoDma, RxDma>
{
type Error = Error;
fn bwrite_all(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {