Gromov-Hausdorff limits of curves with flat metrics and non-Archimedean geometry