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

Method write_fmt

crates/codegen/src/code_indenter.rs:100–102  ·  view source on GitHub ↗

This method allows `write!` and `writeln!` to be used directly on `CodeIndenter`. It does the same thing as using it via the `fmt::Write` trait but in a non-fallible manner. This is only allowed on `String` because it's the only type that can't fail to write.

(&mut self, args: fmt::Arguments)

Source from the content-addressed store, hash-verified

98 // It does the same thing as using it via the `fmt::Write` trait but in a non-fallible manner.
99 // This is only allowed on `String` because it's the only type that can't fail to write.
100 pub fn write_fmt(&mut self, args: fmt::Arguments) {
101 fmt::Write::write_fmt(self, args).unwrap()
102 }
103}
104pub struct IndentScope<'a, W: fmt::Write> {
105 fmt: &'a mut CodeIndenter<W>,

Callers 1

fmtMethod · 0.45

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected