MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / bulleted_item

Function bulleted_item

crates/chat-cli/src/cli/chat/parse.rs:232–247  ·  view source on GitHub ↗
(
    mut o: impl Write + 'b,
    state: &'b mut ParseState,
)

Source from the content-addressed store, hash-verified

230}
231
232fn bulleted_item<'a, 'b>(
233 mut o: impl Write + 'b,
234 state: &'b mut ParseState,
235) -> impl FnMut(&mut Partial<&'a str>) -> PResult<(), Error<'a>> + 'b {
236 move |i| {
237 if !state.newline {
238 return Err(ErrMode::from_error_kind(i, ErrorKind::Fail));
239 }
240
241 let ws = (space0, alt(("-", "*")), space1).parse_next(i)?.0;
242 let print = format!("{ws}• ");
243
244 queue_newline_or_advance(&mut o, state, print.width())?;
245 queue(&mut o, style::Print(print))
246 }
247}
248
249fn numbered_item<'a, 'b>(
250 mut o: impl Write + 'b,

Callers

nothing calls this directly

Calls 2

queue_newline_or_advanceFunction · 0.85
queueFunction · 0.85

Tested by

no test coverage detected