MCPcopy Create free account
hub / github.com/Infinity-OS/infinity / write_str

Method write_str

src/device/serial.rs:134–149  ·  view source on GitHub ↗
(&mut self, s: &str)

Source from the content-addressed store, hash-verified

132
133impl Write for SerialPort {
134 fn write_str(&mut self, s: &str) -> Result<(), fmt::Error> {
135 for byte in s.bytes() {
136 match byte {
137 8 | 0x7f => {
138 self.write(8);
139 self.write(b' ');
140 self.write(8);
141 },
142 _ => {
143 self.write(byte);
144 }
145 }
146 }
147
148 Ok(())
149 }
150}

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected