Skip to content

Commit 744de0f

Browse files
committed
Use move closures
1 parent bea0c88 commit 744de0f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/reader/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ impl PullParser {
464464
self.read_prefix_separator = false;
465465
}
466466

467-
let invoke_callback = |this: &mut PullParser, t| {
467+
let invoke_callback = move |this: &mut PullParser, t| {
468468
let name = this.take_buf();
469469
match name.parse() {
470470
Ok(name) => on_name(this, t, name),

src/writer/emitter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ impl Emitter {
253253
self.before_markup(target)?;
254254

255255
let result = {
256-
let mut write = || {
256+
let mut write = move || {
257257
write!(target, "<?{name}")?;
258258

259259
if let Some(data) = data {
@@ -415,7 +415,7 @@ impl Emitter {
415415
// TODO: add escaping dashes at the end of the comment
416416

417417
let autopad_comments = self.config.autopad_comments;
418-
let write = |target: &mut W| -> Result<()> {
418+
let write = move |target: &mut W| -> Result<()> {
419419
target.write_all(b"<!--")?;
420420

421421
if autopad_comments && !content.starts_with(char::is_whitespace) {

0 commit comments

Comments
 (0)