  We prove that the sharp Buser's inequality obtained in the framework of
$\mathsf{RCD}(1,\infty)$ spaces by the first two authors is rigid, i.e.
equality is obtained if and only if the space splits isomorphically a Gaussian.
The result is new even in the smooth setting. We also show that the equality in
Cheeger's inequality is never attained in the setting of
$\mathsf{RCD}(K,\infty)$ spaces with finite diameter or positive curvature, and
we provide several examples of spaces with Ricci curvature bounded below where
these assumptions are not satisfied and the equality is attained.
