MCPcopy Index your code
hub / github.com/RustPython/RustPython / p_if

Method p_if

crates/codegen/src/unparse.rs:44–49  ·  view source on GitHub ↗
(&mut self, cond: bool, s: &str)

Source from the content-addressed store, hash-verified

42 }
43
44 fn p_if(&mut self, cond: bool, s: &str) -> fmt::Result {
45 if cond {
46 self.f.write_str(s)?;
47 }
48 Ok(())
49 }
50
51 fn p_delim(&mut self, first: &mut bool, s: &str) -> fmt::Result {
52 self.p_if(!core::mem::take(first), s)

Callers 2

p_delimMethod · 0.80
unparse_argumentsMethod · 0.80

Calls 1

write_strMethod · 0.45

Tested by

no test coverage detected