Heine-Cantor Theorem

Theorem
Let $M_1$ and $M_2$ be metric spaces.

Let $f: M_1 \to M_2$ be a continuous mapping.

If $M_1$ is compact, then $f$ is uniformly continuous on $M_1$.

Warning
If a mapping is uniformly continuous it is not necessarily compact.

For example, the identity mapping is (trivially) uniformly continuous on a mapping from any metric space, whether compact or not.