Hacker News new | ask | show | jobs
by csomar 693 days ago
It's implied. Here is the full syntax.

> let time: Timestamp = "2024-07-11T01:14:00Z".parse::<Timestamp>()?;

1 comments

That ::<TYPE> thing at the end is called a turbofish. It is rarely necessary to give it explicitly (but sometimes you do when the compiler cannot infer the return type on its own—thusfar in my own rust coding I’ve needed it exactly once).
It’s useful to know the full syntax, I’ve definitely encountered needing it more than one time.