Re:Rust: A Critical Retrospective
by skavi on Friday May 20, 2022 @01:13AM
(#31443604)
> In more plain terms, the line above does something like invoke a method called “to_read” on the object (actually `struct`) “Trying”...
In fact, this invokes an associated function, `to_read`, implemented for the `Trying` type. If `Trying` was an instance `Trying.to_read...` would be correct (though instances are typically snake_cased in Rust).
I'll rewrite the line, assuming `syntax` is the self parameter:
In fact, this invokes an associated function, `to_read`, implemented for the `Trying` type. If `Trying` was an instance `Trying.to_read...` would be correct (though instances are typically snake_cased in Rust).
I'll rewrite the line, assuming `syntax` is the self parameter:
In my opinion, this is honestly not bad.