MCPcopy Create free account
hub / github.com/astral-sh/ruff / map

Method map

crates/ruff_python_formatter/src/string/docstring.rs:664–669  ·  view source on GitHub ↗

Return this reformatted line, but with the given function applied to the text of the line.

(self, mut map: impl FnMut(&str) -> String)

Source from the content-addressed store, hash-verified

662 /// Return this reformatted line, but with the given function applied to
663 /// the text of the line.
664 fn map(self, mut map: impl FnMut(&str) -> String) -> OutputDocstringLine<'static> {
665 OutputDocstringLine {
666 line: Cow::Owned(map(&self.line)),
667 ..self
668 }
669 }
670}
671
672/// A single code example extracted from a docstring.

Callers 15

format_lineMethod · 0.45
nextMethod · 0.45
format_snippetFunction · 0.45
fold_prefix_suffixFunction · 0.45
format_bodyFunction · 0.45
renderMethod · 0.45
fromMethod · 0.45
derive_implFunction · 0.45
handle_optionFunction · 0.45
map_codesFunction · 0.45
generate_iter_implFunction · 0.45
derive_implFunction · 0.45

Calls

no outgoing calls

Tested by 15

fromMethod · 0.36
text_widthFunction · 0.36
visit_string_literalMethod · 0.36
ensure_unchanged_astFunction · 0.36
query_nameFunction · 0.36
read_directoryFunction · 0.36
read_directoryFunction · 0.36
find_python_filesFunction · 0.36
related_informationFunction · 0.36