When looking through libcore and libstd, there are some impl methods that
simply delegate to functions elsewhere in the file, like so:
impl extensions of unique_str for ~str {
#[inline]
fn trim() -> ~str { trim(self) }
}
Is this a pattern that all the impls in the standard libraries ought to
follow? Is there some value to being able to always refer to
module::function() rather than type.method()? Assuming that #[inline] or
#[inline(always)] remove any overhead, I don't think there's any downside
to it other than cluttered docs.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev