Here is Theorem 4.20 in the book Principles of Mathematical Analysis by Walter Rudin, third edition:
Let $E$ be a non-compact set in $\mathbb{R}^1$. Then
(a) there exists a continuous function on $E$ which is not bounded;
(b) there exists a continuous and bounded function on $E$ which has no maximum.
If, in addition, $E$ is bounded, then
(c) there exists a continuous function on $E$ which is not uniformly continuous.
Thus Theorem 4.20(c) can be stated as follows: On a bound subset non-compact of $\mathbb{R}$, there exists a continuous function which is not uniformly continuous. Or, equivalently, if every continuous function on a non-compact subset $E$ of $\mathbb{R}$ is also uniformly continuous, then $E$ is unbounded.
Now my question is as follows:
Let $E$ be a non-compact subset of $\mathbb{R}$ such that $E$ is not bounded. Then can we conclude from Theorem 4.20(c) in Baby Rudin that every continuous function $f \colon E \to \mathbb{R}$ is also uniformly continuous on $E$? If so, then how to give a proof of this fact?
And, is there a way of generalising this result to maps between arbitrary metric spaces, along the lines of Theorem 4.19 in Baby Rudin?