Apple versus donut: How the shape of a tokamak impacts the limits of the edge of the plasma