Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Hard-won lessons: Five years with Node.js. Parent comment
The code in question looks like:
iter.next().ok_or(ErrorKind::NotEnoughArguments.into())?.parse().chain_err(|| "cannot parse argument")?
the solution is of course to do
iter.next().ok_or::<Error>(ErrorKind::NotEnoughArguments.into())?.parse().chain_err(|| "cannot parse argument")?
in a dynamic language, you wouldn't have to worry about this; in fact, you wouldn't need to call .into() either - there's just less typing and compiler errors
There are no comments on this comment yet.
The code in question looks like:
the compiler responds with cannot infer type information for `_`the solution is of course to do
then the type inference is decidablein a dynamic language, you wouldn't have to worry about this; in fact, you wouldn't need to call .into() either - there's just less typing and compiler errors