I have a concern about a definition of a quasi-affine variety. I had a professor who defined a quasi-affine variety to be an intersection of an open set and a closed set in some affine space $\mathbb{A}^n$, and an affine variety was a quasi-affine variety isomorphic to a closed set.
However, I think the more common definition is that given in Hartshorne, where a quasi-affine variety is an open subset of an affine variety, which is an irreducible closed subset of $\mathbb{A}^n$.
Are these definitions equivalent? Or have I been learning things slightly differently?