html5ever icon indicating copy to clipboard operation
html5ever copied to clipboard

TreeSink requires `Tendril<UTF8, NonAtomic>`?

Open pwoolcoc opened this issue 4 years ago • 2 comments
trafficstars

Is there a reason that we can't implement TreeSink using Atomic Tendrils? I'm trying to use an HTML library built on top of html5ever in a future and it seems that I am unable to because of StrTendril being !Send. I tried swapping out the Tendril used by the tree builder to be Atomic but it seems that once I do that I can no longer implement TreeSink.

pwoolcoc avatar Jan 04 '21 17:01 pwoolcoc

Do you have a code sample that demonstrates what you mean?

jdm avatar Jan 05 '21 01:01 jdm

A lot of functions and types used in TreeSink use non-atomic Tendrils, like NodeOrText or the function create_comment. However, I don't think parsing in a future is a good idea since parsing usually takes milliseconds.

nathaniel-daniel avatar Apr 02 '21 01:04 nathaniel-daniel