The accepted answer in
states
Since $C$ is compact and $\partial U$ is closed, $d(C,\partial U)=d(x,y)$ for some $x\in C,\ y\in\partial U$. And since $C\subset U$ with $U$ open, we have $$d_0=d(C,\partial U)=d(x,y)>0$$
But is this true for the infinite-dimensional case as well? For example (there are many related questions in the finite-dimensional setting) in the proof
closed and bounded sets being compact is crucial.