Auto merge of #22335 - asajeffrey:magicleap-duckduckgo, r=jdm

Change ML search engine to duckduckgo

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because we don't test default search engine

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22335)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-11-30 21:10:27 -05:00 committed by GitHub
commit 99f457ee12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -311,7 +311,7 @@ pub unsafe extern "C" fn navigate_servo(servo: *mut ServoInstance, text: *const
.to_str()
.expect("Failed to convert text to UTF-8");
let url = ServoUrl::parse(text).unwrap_or_else(|_| {
let mut search = ServoUrl::parse("http://google.com/search")
let mut search = ServoUrl::parse("https://duckduckgo.com")
.expect("Failed to parse search URL")
.into_url();
search.query_pairs_mut().append_pair("q", text);