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

Method write

crates/css_parse/src/cursor_write_sink.rs:19–29  ·  view source on GitHub ↗
(&mut self, c: Cursor, source: &'a str)

Source from the content-addressed store, hash-verified

17 }
18
19 fn write(&mut self, c: Cursor, source: &'a str) -> Result {
20 self.err?;
21 if let Some(last) = self.last_token
22 && last.needs_separator_for(c.token())
23 {
24 self.writer.write_char(' ')?;
25 }
26 self.last_token = Some(c.token());
27 self.writer.write_str(c.str_slice(source))?;
28 Ok(())
29 }
30}
31
32impl<'a, T: Write> CursorSink for CursorWriteSink<'a, T> {

Callers 2

atomizeMethod · 0.45
appendMethod · 0.45

Calls 4

needs_separator_forMethod · 0.80
write_strMethod · 0.80
str_sliceMethod · 0.80
tokenMethod · 0.45

Tested by

no test coverage detected