MCPcopy Create free account
hub / github.com/bevyengine/bevy-website / into_string

Method into_string

write-rustdoc-hide-lines/src/code_block_definition.rs:50–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48
49impl Annotation {
50 fn into_string(self) -> String {
51 match self {
52 Annotation::HideLines(ranges) => {
53 let ranges = ranges
54 .iter()
55 .map(|r| {
56 if r.start == r.end {
57 format!("{}", r.start)
58 } else {
59 format!("{}-{}", r.start, r.end)
60 }
61 })
62 .collect::<Vec<_>>()
63 .join(" ");
64
65 format!("hide_lines={ranges}")
66 }
67 Annotation::Other(content) => content,
68 }
69 }
70}
71
72#[derive(Debug, PartialEq)]

Callers 1

format_fileFunction · 0.80

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected