When running the Struct sub-typing tutorial, the program hangs. This reproduces by copying the code into a text file and calling hare run
on it.
I am running Hare v20220328-2927-gf955d4e1ab-alpine.
Some debugging shows that the limit_write
function is being called repeatedly.
Beyond that, the instantiation of the
limitstream
struct uses the...
syntax (on line 22), which seems to not be needed since all of the fields are set manually.It also might be helpful to explain what that syntax does, since it's unclear to a learner whether it sets a default value (which would make sense) or if it copies the value last set like how the same syntax works for arrays.
This was because fmt was updated (incorrectly) to use io::writeall, which retried indefinitely on short writes.