Rust update: f.buf.write -> f.write