Tuesday, October 25, 2022

Rust pop-quiz: order books, printed prettily, I pray thee

Rust pop-quiz

We see the USD-type has a pretty-printer.


(line number is annotated)

SO: write a pretty-printer for order book, such that it outputs as, e.g.:

KUJI / axlUSDC 1.027 ($1.03)

instead of the debugging nightmare we saw in the last quiz answer.

No comments:

Post a Comment