struct S { v: i32 } fn larger(v1: S, v2: S) -> S { if v1.v > v2.v { v1 } else { v2 } } fn main() { let s1 = S{v:4}; let s2 = S{v:1}; let s3 = larger(s1, s2); println!("{}", s3.v) }