MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / write_indent

Method write_indent

crates/codegen/src/code_indenter.rs:47–52  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

45 IndentScope { fmt: self }
46 }
47 fn write_indent(&mut self) -> fmt::Result {
48 for _ in 0..self.level {
49 self.writer.write_str(self.indent)?;
50 }
51 Ok(())
52 }
53
54 /// Invoke `f` while indenting one level greater than `self` currently does.
55 pub fn with_indent<Res>(&mut self, f: impl FnOnce(&mut Self) -> Res) -> Res {

Callers 2

delimited_blockMethod · 0.45
write_strMethod · 0.45

Calls 2

OkFunction · 0.50
write_strMethod · 0.45

Tested by

no test coverage detected