-
destructure a tuple value코딩Coding/★Rust★기초★Syntax 2023. 9. 29. 12:39728x90
fn main() { let tup = (500, 6.4, 1); let (x, y, z) = tup; println!("The value of y is: {y}"); }
https://doc.rust-lang.org/book/ch03-02-data-types.html반응형'코딩Coding > ★Rust★기초★Syntax' 카테고리의 다른 글
impl Trait과 Box<dyn Trait> - Rust 프로그래밍 (0) 2023.10.06 Rc 타입과 Weak 타입 - Rust 프로그래밍 (0) 2023.10.06 Rust-How do I disambiguate associated types? (0) 2023.10.03 Rust❤️Implementing Deserialize (0) 2023.09.30 Unstable Rust❤️A Rust Function that can only be called 3 times (0) 2023.09.28 A Rust university course (0) 2023.09.22 Rust❤️Trait기초 문법 (0) 2023.09.20 Rust❤그리면서 읽히는 Turtle 그려보면서 코드를 익히자 (0) 2023.09.16