MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / title_comma_separate

Function title_comma_separate

src/sql-pretty/src/util.rs:34–45  ·  view source on GitHub ↗
(title: S, f: F, v: &'a [T])

Source from the content-addressed store, hash-verified

32}
33
34pub(crate) fn title_comma_separate<'a, F, T, S>(title: S, f: F, v: &'a [T]) -> RcDoc<'a, ()>
35where
36 F: Fn(&'a T) -> RcDoc<'a>,
37 S: Into<String>,
38{
39 let title = RcDoc::text(title.into());
40 if v.is_empty() {
41 title
42 } else {
43 nest_comma_separate(title, f, v)
44 }
45}
46
47pub(crate) fn nest_comma_separate<'a, F, T: 'a, I>(
48 title: RcDoc<'a, ()>,

Callers 3

doc_order_byMethod · 0.85
doc_queryMethod · 0.85
doc_selectMethod · 0.85

Calls 2

nest_comma_separateFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected