Let $(X,d)$ be a metric space and $Y\subseteq X$ a metric space with the same metric. Show that $Y$ is compact iff every collection of open sets in $X$ that covers $Y$ has a finite subcover.
Seems a bit too simple so I feel I have overlooked something. I simply need a proof check. If it is correct, is there any details I can add to make it slightly more rigorous?
Proof (my attempt):
If $Y$ is compact, then every open cover of $Y$ has a finite subcover. Choose some open cover $O$ and a subcollection of $O$ that is a finite subcover for $Y$, call it $O_f$. Then, because $Y\subseteq X$, then $O_f$ is a collection of open sets in $X$ that covers $Y$. It is a finite subcover.
Conversely, suppose any collection of open sets on $X$ that covers $Y$ has a finite subcover. By definition, $Y$ is compact.