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

Function is_narrow

std/src/console/mod.rs:495–500  ·  view source on GitHub ↗

Returns true if the console is too narrow for the standard interface. A narrow console is defined as one that cannot fit the welcome message.

(console: &dyn Console)

Source from the content-addressed store, hash-verified

493///
494/// A narrow console is defined as one that cannot fit the welcome message.
495pub fn is_narrow(console: &dyn Console) -> bool {
496 match console.size_chars() {
497 Ok(size) => size.x < 50,
498 Err(_) => false,
499 }
500}
501
502#[cfg(test)]
503mod tests {

Callers 4

do_loginMethod · 0.85
newMethod · 0.85
show_dirFunction · 0.85
print_welcomeFunction · 0.85

Calls 1

size_charsMethod · 0.45

Tested by

no test coverage detected