Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dasp::Frame: Generic impl for all [impl Sample;const N: usize] #180

Merged
merged 1 commit into from
Nov 11, 2023

Commits on Nov 17, 2022

  1. dasp_frame:Generic impl for all [impl Sample;const N: usize]

    Replace the hard-coded macro implementing `Frame` for `[impl Sample;0-32]`,
    with a generic impl based on const-generics.
    
    I discovered the need for this, when trying to simplify some macro-
    -implementations in the `ebur128` crate with const-generics.
    
    We cannot remove the need for `NumChannels`, since (see reference 1)
    "Associated Const Equality" is not yet stable. We can however adapt the
    `NumChannels` strategy from `N1..N32` to a `NChannels<N>`-generic type.
    
    Some opportunities like removing `unsafe` from `zip_map`, remain out of
    reach due to pending stabilization of the standard library.
    
    1: rust-lang/rust#92827
    rawler committed Nov 17, 2022
    Configuration menu
    Copy the full SHA
    885825f View commit details
    Browse the repository at this point in the history