We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
let mut url = Url::parse("https://example.net/hello").unwrap(); url.set_host(None).unwrap();
thread 'main' panicked at 'begin <= end (19 <= 6) when slicing `https://example.net/hello`', ../src/libcore/str/mod.rs:1719 stack backtrace: 1: 0x10d66ffaa - std::sys::imp::backtrace::tracing::imp::write::h383d0c200a1dd210 2: 0x10d67fd6f - std::panicking::default_hook::{{closure}}::h9445b5c503f9824b 3: 0x10d67cf2f - std::panicking::default_hook::h36fefcc1f50aa494 4: 0x10d67d566 - std::panicking::rust_panic_with_hook::hf54dd023dee7ef13 5: 0x10d67d404 - std::panicking::begin_panic::ha78ff90bed4768ad 6: 0x10d67d322 - std::panicking::begin_panic_fmt::hc7561fdea0f5f71c 7: 0x10d67d287 - rust_begin_unwind 8: 0x10d6bfc10 - core::panicking::panic_fmt::hb7aed24f08b1bad6 9: 0x10d6c0ae5 - core::str::slice_error_fail::hc148aa73da59a300 10: 0x10d4d3314 - core::str::traits::<impl core::ops::Index<core::ops::Range<usize>> for str>::index::hc91b0c453a2b9a37 11: 0x10d4c9474 - <collections::string::String as core::ops::Index<core::ops::Range<usize>>>::index::hfbbcd72b44dfd783 12: 0x10d4caaba - collections::string::String::drain::h1868f57c1d4390c5 13: 0x10d4ee1e2 - url::Url::set_host::hcdae4ea78ed9facd 14: 0x10d4c8ca9 - rust_out::main::ha208b69ccbc11839 15: 0x10d68032a - __rust_maybe_catch_panic 16: 0x10d67ddf6 - std::rt::lang_start::h26c24604fceba8d3 17: 0x10d4c8d89 - main ', ../src/librustdoc/test.rs:315 stack backtrace: 1: 0x113674faa - std::sys::imp::backtrace::tracing::imp::write::h383d0c200a1dd210 2: 0x113684d6f - std::panicking::default_hook::{{closure}}::h9445b5c503f9824b 3: 0x113681e35 - std::panicking::default_hook::h36fefcc1f50aa494 4: 0x113682566 - std::panicking::rust_panic_with_hook::hf54dd023dee7ef13 5: 0x113682404 - std::panicking::begin_panic::ha78ff90bed4768ad 6: 0x113682322 - std::panicking::begin_panic_fmt::hc7561fdea0f5f71c 7: 0x10f0deaf5 - rustdoc::test::runtest::h9f5d35a4e456f3f0 8: 0x10efcd420 - <F as test::FnBox<T>>::call_box::hfb4e687f64168832 9: 0x11368532a - __rust_maybe_catch_panic 10: 0x10f33bb50 - std::panicking::try::do_call::h7476444272edf7f4 11: 0x11368532a - __rust_maybe_catch_panic 12: 0x10f341f9a - <F as alloc::boxed::FnBox<A>>::call_box::hf1758710039efd69 13: 0x1136813d4 - std::sys::imp::thread::Thread::new::thread_start::hcd65577217ddb0d9 14: 0x7fffea8beaaa - _pthread_body 15: 0x7fffea8be9f6 - _pthread_start
The text was updated successfully, but these errors were encountered:
Prevent panic when calling url::Url::set_host with None.
url::Url::set_host
None
f82eb26
Fixes #243.
b0d6060
2c9e076
Auto merge of #244 - servo:sethostnone, r=SimonSapin
ae7204f
Prevent panic when calling `url::Url::set_host` with `None`. Fixes #243. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/244) <!-- Reviewable:end -->
No branches or pull requests
The text was updated successfully, but these errors were encountered: