Make variable binding more consistent with rest of the file

https://reviewable.io/reviews/servo/servo/6174#-Jq48M5Vu-YnswI0jcvD
This commit is contained in:
Corey Farwell 2015-05-24 10:50:36 -04:00
parent 8e3f4bba85
commit 5793add4cd

View file

@ -196,8 +196,8 @@ impl Handler {
const_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
match reciever.recv().unwrap() {
Ok(value) => {
let v_res = ValueResponse::new(value.map(|x| WebElement::new(x).to_json()).to_json());
Ok(WebDriverResponse::Generic(v_res))
let value_resp = value.map(|x| WebElement::new(x).to_json()).to_json();
Ok(WebDriverResponse::Generic(ValueResponse::new(value_resp)))
}
Err(_) => Err(WebDriverError::new(ErrorStatus::InvalidSelector,
"Invalid selector"))