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

Method maybe_flush

std/src/console/trivial.rs:45–47  ·  view source on GitHub ↗

Flushes the console, which has already been written to via `lock`, if syncing is enabled.

(&self, mut lock: StdoutLock<'_>)

Source from the content-addressed store, hash-verified

43impl TrivialConsole {
44 /// Flushes the console, which has already been written to via `lock`, if syncing is enabled.
45 fn maybe_flush(&self, mut lock: StdoutLock<'_>) -> io::Result<()> {
46 if self.sync_enabled { lock.flush() } else { Ok(()) }
47 }
48}
49
50#[async_trait(?Send)]

Callers 1

writeMethod · 0.45

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected