MCPcopy Index your code
hub / github.com/endbasic/endbasic / do_eof_or_delete

Method do_eof_or_delete

std/src/console/readline.rs:240–246  ·  view source on GitHub ↗

Treats EOF as delete while text exists, or reports end-of-input otherwise.

(&mut self)

Source from the content-addressed store, hash-verified

238
239 /// Treats EOF as delete while text exists, or reports end-of-input otherwise.
240 fn do_eof_or_delete(&mut self) -> io::Result<DispatchResult> {
241 if self.line.is_empty() {
242 Err(io::Error::new(io::ErrorKind::UnexpectedEof, "EOF"))
243 } else {
244 self.do_delete()
245 }
246 }
247
248 /// Moves the cursor to the start of the line.
249 fn do_home(&mut self) -> io::Result<DispatchResult> {

Callers 1

runMethod · 0.80

Calls 2

do_deleteMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected