Auto merge of #32107 - Stebalien:partial-write, r=alexcrichton
Auto merge of #32107 - Stebalien:partial-write, r=alexcrichton

Never return an error after a partial write

If LineWriter fails to flush, return the number of bytes written instead
of an error.

Fixes #32085

graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust