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

Method stop

crates/literal/src/escape.rs:173–182  ·  view source on GitHub ↗
(
                    single_count: usize,
                    double_count: usize,
                    preferred_quote: Quote,
                )

Source from the content-addressed store, hash-verified

171 let Some(new_len) = length_add(out_len, incr) else {
172 #[cold]
173 const fn stop(
174 single_count: usize,
175 double_count: usize,
176 preferred_quote: Quote,
177 ) -> EscapeLayout {
178 EscapeLayout {
179 quote: choose_quote(single_count, double_count, preferred_quote).0,
180 len: None,
181 }
182 }
183 return stop(single_count, double_count, preferred_quote);
184 };
185 out_len = new_len;

Callers

nothing calls this directly

Calls 1

choose_quoteFunction · 0.85

Tested by

no test coverage detected