rust-embedded / embedded-dma

Apache License 2.0
35 stars 12 forks source link

const generics #14

Closed burrbull closed 2 years ago

thalesfragoso commented 3 years ago

I would hold this just a little longer, because it's a very high MSRV (latest stable) and a lot of HALs depend on this crate.

We might want to release #13 first, depending on how long it takes to be finished.

burrbull commented 3 years ago

I would hold this just a little longer, because it's a very high MSRV (latest stable) and a lot of HALs depend on this crate.

We might want to release #13 first, depending on how long it takes to be finished.

That's why I've rebased on #13 and that's why I suggest to increase major version.

And how long to wait? I've been waiting for 3 years to get rid of GenericArray's.

korken89 commented 3 years ago

I would also like to see this merged and released soon

korken89 commented 3 years ago

Ping @thalesfragoso

thalesfragoso commented 3 years ago

Ok, I think we should go forward with const-generics now, but now this PR depends on #13, which isn't complete yet due to missing docs.

korken89 commented 2 years ago

Hi, one impl seems to be missing:

WriteTarget for [MaybeUninit<T>; N]

burrbull commented 2 years ago

WriteTarget for [MaybeUninit; N]

error[E0119]: conflicting implementations of trait `WriteTarget` for type `[core::mem::MaybeUninit<_>; _]`
   --> src/lib.rs:214:1
    |
206 | unsafe impl<T: WriteTarget, const N: usize> WriteTarget for [T; N] {
    | ------------------------------------------------------------------ first implementation here
...
214 | unsafe impl<T: WriteTarget, const N: usize> WriteTarget for [MaybeUninit<T>; N] {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `[core::mem::MaybeUninit<_>; _]`
korken89 commented 2 years ago

Ahh it was already captured by the array, awesome!

andrewgazelka commented 2 years ago

@burrbull you might want to rebase on #19 once it gets (squash?) merged , which is my copy of #13 but with documentation.

burrbull commented 2 years ago

Done

bors[bot] commented 2 years ago

Build succeeded: