Constant MAX_TRAVERSAL_DEPTH

Source
const MAX_TRAVERSAL_DEPTH: usize = 64;
Expand description

Depth at which we will stop traversing and return an error.

Used to prevent stack overflows. Also allows us to avoid using a HashSet in no_std builds.

This limit matches the one used in HarfBuzz: HB_MAX_NESTING_LEVEL: https://github.com/harfbuzz/harfbuzz/blob/c2f8f35a6cfce43b88552b3eb5c05062ac7007b2/src/hb-limits.hh#L53 hb_paint_context_t: https://github.com/harfbuzz/harfbuzz/blob/c2f8f35a6cfce43b88552b3eb5c05062ac7007b2/src/OT/Color/COLR/COLR.hh#L74