8. If the set $M=\left\{x \mid x^{2}-2 x+m=0, m \in \mathbf{R}\right\}$, then the sum of all elements in set $M$ is . $\qquad$
8. 2 or 1. $\Delta \neq 0$ 时, $x_{1}+x_{2}=2 ; \Delta=0$ 时, $M=\{1\}$, 所以和为 1 .

8. 2 or 1. When $\Delta \neq 0$, $x_{1}+x_{2}=2$; when $\Delta=0$, $M=\{1\}$, so the sum is 1.