MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / roundtrip

Function roundtrip

css-inline/src/html/document.rs:476–492  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

474 }
475
476 fn roundtrip(bytes: &[u8]) -> Vec<u8> {
477 let mut buffer = Vec::new();
478 let doc = Document::parse_with_options(bytes, 0, InliningMode::Document);
479 doc.serialize(
480 &mut buffer,
481 vec![None; doc.nodes.len()],
482 false,
483 false,
484 false,
485 None,
486 InliningMode::Document,
487 false,
488 false,
489 )
490 .expect("Failed to serialize");
491 buffer
492 }
493
494 #[test]
495 fn test_collect_styles() {

Callers 2

test_pseudo_classFunction · 0.85
test_commentFunction · 0.85

Calls 2

parse_with_optionsFunction · 0.85
serializeMethod · 0.45

Tested by 2

test_pseudo_classFunction · 0.68
test_commentFunction · 0.68