the code is:
#[derive(Default, Debug)]
pub struct StructTest {
a: u32,
b: u32,
c: Vec<u32>,
}
fn main(){
let StructTest{a,..} = StructTest::default();
println!{"{}",a};
}
question: so,are the following two ends of the code is equal?
A:
let StructTest{a,..} = StructTest::default();
println!{"{}",a};
B:
let st = StructTest::default();
let a=st.a;
println!{"{}",a};
i mean the question is ask for var "a".in the A,the "a" still can be println,and the value from StructTest::default()'s a.
thanks for the help.