Fix some unused_mut/unused_result warnings

The `.encode()`s from where the unused_result warnings come from seem to wrap an `encode()` and return `Ok(())`.

They should probably bubble the result out.