MCPcopy Create free account
hub / github.com/csskit/csskit / append

Method append

crates/css_parse/src/traits/cursor_sink.rs:18–27  ·  view source on GitHub ↗
(&mut self, c: Cursor)

Source from the content-addressed store, hash-verified

16
17impl<'a> CursorSink for Vec<'a, Cursor> {
18 fn append(&mut self, c: Cursor) {
19 // If two adjacent cursors which could not be re-tokenized in the same way if they were written out adjacently occur
20 // then they should be separated by some token.
21 if let Some(last) = self.last()
22 && last.token().needs_separator_for(c.into())
23 {
24 self.push(SEPARATOR);
25 }
26 self.push(c);
27 }
28}
29
30impl<'a> SourceCursorSink<'a> for Vec<'a, SourceCursor<'a>> {

Callers 4

to_cursorsMethod · 0.45
to_cursorsMethod · 0.45
to_cursorsMethod · 0.45
to_cursorsMethod · 0.45

Calls 2

needs_separator_forMethod · 0.80
tokenMethod · 0.45

Tested by

no test coverage detected