Change unnecessary mut variable to default immutable
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
efb283f6fe
commit
aacfcc58b9
1 changed files with 2 additions and 2 deletions
|
@ -347,14 +347,14 @@ impl Element {
|
||||||
Event::Text(s) => {
|
Event::Text(s) => {
|
||||||
let text = s.unescape_and_decode(reader)?;
|
let text = s.unescape_and_decode(reader)?;
|
||||||
if text != "" {
|
if text != "" {
|
||||||
let mut current_elem = stack.last_mut().unwrap();
|
let current_elem = stack.last_mut().unwrap();
|
||||||
current_elem.append_text_node(text);
|
current_elem.append_text_node(text);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Event::CData(s) => {
|
Event::CData(s) => {
|
||||||
let text = reader.decode(&s).into_owned();
|
let text = reader.decode(&s).into_owned();
|
||||||
if text != "" {
|
if text != "" {
|
||||||
let mut current_elem = stack.last_mut().unwrap();
|
let current_elem = stack.last_mut().unwrap();
|
||||||
current_elem.append_text_node(text);
|
current_elem.append_text_node(text);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue