Let $(X, d)$ be a complete metric space without isolated points. If each function continues $f: X \to \mathbb{R}$ is uniformly continuous, show that X is compact.
I was reviewing this question Compact iff all continuous functions are uniformly cont.. I am not very clear in the proof why the connectedness is necessary. in this case I was thinking if I could prove that $X$ is totally bounded (how could i prove it?) and use the fact that complete and totally bounded implies that $X$ is compact. The truth is I am not very clear on how to do this proof.
OUTLINE: