A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rust-lang/rust/issues/91613 below:

GitHub ยท Where software is built

Feature gate: #![feature(array_repeat)]

This is a tracking issue for creating a fixed-size array by repeatedly Cloning an item, or by repeatedly calling a possibly-fallible nullary FnMut.

Public API
// core::array

pub fn repeat<T: Clone, const N: usize>(value: T) -> [T; N];
pub fn repeat_with<T, const N: usize>(f: impl FnMut() -> T) -> [T; N];
pub fn try_repeat_with<R: Try, const N: usize>(
    f: impl FnMut() -> R,
) -> ChangeOutputType<R, [R::Output; N]>
where
    R::Residual: Residual<[R::Output; N]>;
Steps / History Unresolved Questions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4