Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/zerovec/src/ule/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  macros.rs

  Sprache: Rust
 

// This file is part of ICU4X. For terms of use, please see the file
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

/// Given `Self` (`$aligned`), `Self::ULE` (`$unaligned`), and a conversion function (`$single` or
/// `Self::from_aligned`), implement `from_array` for arrays of `$aligned` to `$unaligned`.
///
/// The `$default` argument is due to current compiler limitations.
/// Pass any (cheap to construct) value.
#[macro_export]
macro_rules! impl_ule_from_array {
    ($aligned:ty, $unaligned:ty, $default:expr, $single:path) => {
        #[doc = concat!("Convert an array of `", stringify!($aligned), "` to an array of `", stringify!($unaligned), "`.")]
        pub const fn from_array<const N: usize>(arr: [$aligned; N]) -> [Self; N] {
            let mut result = [$default; N];
            let mut i = 0;
            // Won't panic because i < N and arr has length N
            #[allow(clippy::indexing_slicing)]
            while i < N {
                result[i] = $single(arr[i]);
                i += 1;
            }
            result
        }
    };
    ($aligned:ty, $unaligned:ty, $default:expr) => {
        impl_ule_from_array!($aligned, $unaligned, $default, Self::from_aligned);
    };
}

Messung V0.5 in Prozent
C=73 H=97 G=85

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-19) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.