struct A;
impl<'this> A {
pub fn new() -> Self {
return Self;
}
pub fn do_a(&'this mut self) -> &'this mut Self {
return self;
}
pub fn do_b(&'this self) -> bool {
return true;
}
}
Which way of writing code is better in Rust internal operations context?
This? a
let a: A = A::new();
a.do_a().do_b();
Or this? b
let a: A = A::new();
a.do_a();
a.do_b();