aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/webdriver_handlers.rs
diff options
context:
space:
mode:
authorJohannes Linke <johannes.linke@posteo.de>2016-01-02 16:51:01 +0100
committerJohannes Linke <johannes.linke@posteo.de>2016-01-02 23:27:15 +0100
commit6b215f38eefc98853244c2ec6f4187ae6f000417 (patch)
treecf4dbc65e6b6fa641359b713f91b596bf9f9a666 /components/script/webdriver_handlers.rs
parentb1ca3d1cdff412c5ae12113c3681f789becebabc (diff)
downloadservo-6b215f38eefc98853244c2ec6f4187ae6f000417.tar.gz
servo-6b215f38eefc98853244c2ec6f4187ae6f000417.zip
Fix a bunch of clippy lints
Diffstat (limited to 'components/script/webdriver_handlers.rs')
-rw-r--r--components/script/webdriver_handlers.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/webdriver_handlers.rs b/components/script/webdriver_handlers.rs
index bd5fd9576c7..2ae4931937d 100644
--- a/components/script/webdriver_handlers.rs
+++ b/components/script/webdriver_handlers.rs
@@ -191,7 +191,7 @@ pub fn handle_get_text(page: &Rc<Page>,
reply: IpcSender<Result<String, ()>>) {
reply.send(match find_node_by_unique_id(&*page, pipeline, node_id) {
Some(ref node) => {
- Ok(node.GetTextContent().map(String::from).unwrap_or("".to_owned()))
+ Ok(node.GetTextContent().map_or("".to_owned(), String::from))
},
None => Err(())
}).unwrap();