Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Various cleanup. #8295

Merged
merged 2 commits into from Nov 3, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Avoid some string copies in handle_modify_attribute.

  • Loading branch information
Ms2ger committed Nov 2, 2015
commit 13291c4b64032931a38cd0671075287d87594732
@@ -155,12 +155,12 @@ pub fn handle_modify_attribute(page: &Rc<Page>,
let node = find_node_by_unique_id(&*page, pipeline, node_id);
let elem = node.downcast::<Element>().expect("should be getting layout of element");

for modification in &modifications {
for modification in modifications {
match modification.newValue {
Some(ref string) => {
let _ = elem.SetAttribute(modification.attributeName.clone(), string.clone());
Some(string) => {
let _ = elem.SetAttribute(modification.attributeName, string);
},
None => elem.RemoveAttribute(modification.attributeName.clone()),
None => elem.RemoveAttribute(modification.attributeName),
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.