Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tiny html-to-string footgun #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions examples/html-to-string-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ impl<'a> WalkNodes<'a> {

impl WalkNodesOutput {
fn extend(&mut self, other: WalkNodesOutput) {
self.static_format.push_str(&other.static_format);
self.values.extend(other.values);
self.diagnostics.extend(other.diagnostics);
self.collected_elements.extend(other.collected_elements);
let WalkNodesOutput {
static_format,
values,
diagnostics,
collected_elements,
} = other;

self.static_format.push_str(&static_format);
self.values.extend(values);
self.diagnostics.extend(diagnostics);
self.collected_elements.extend(collected_elements);
}
}
impl<'a> syn::visit_mut::VisitMut for WalkNodes<'a> {}
Expand Down
Loading