Open frederikhors opened 1 month ago
And what @TmLev think too... of course!
If I needed that, I'd do the latter way you described:
use sibling_module::method_implemented_in_another_file;
impl Trait for T {
fn method(&self) {
method_implemented_in_another_file(&self)
}
}
Thank you again for this amazing project!
Is there a way to write the below
impl
on multiple files?The issue is I have many (hundreds) methods and as you can imagine is difficult to write them on a single file.
If I write in a file
and in another file:
I get from the compiler the error
Multiple implementations for the same trait
.I thought it would be a solution to use:
but this way if you forget to write a
trait BlogService
's method the compiler doesn't warn you and I don't know other issues with this.Another way could be to call a method for each of them, like:
but really?!?!
What do you think?