Kode karat di handap ieu bisa dipaké pikeun nyitak garis array ku garis. Kuring geus bungkus eta dina fungsi utama pikeun gampang palaksanaan: ``` fn main() { hayu arr:[i32; 2] = [1,2]; pikeun indéks di 0..arr.len() {println!("{}", arr[index]); } ``` ` output: `` 1 2 `` ` ` Mangga dicatet yén fungsi println Rust ogé bisa nyitak eusi array langsung: `` fn main() { hayu arr:[i32; 2] = [1,2]; println!! "Array {:?}", arr); } ``` ` Output: `` ` Array ["1", "2"] Tapi ieu teu cocog jeung sarat garis output pondok dijelaskeun dina sual.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence