Let $\mathscr{L}$ be a line bundle on a curve $C$ such that $h^0(C, \mathscr{L}) = 1$ and deg $\mathscr{L} = 0$. Why does it imply that $\mathscr{L}$ is the trivial line bundle?

I found some explanation in Vakil's notes [here](https://math.stanford.edu/~vakil/725/class24.pdf), which I don't quite understand. We know that degree of $\mathscr{L}$ can be computed by counting zeros and poles of any rational section. Say $s$ is a section of $\mathscr{L}$, then $s$ must have no pole, and since $\mathscr{L}$ has degree 0, $s$ must also have no zero. That means $s$ is invertible. But why does this then imply that $\mathscr{L}$ is the trivial line bundle?