diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:36 +0000 |
commit | e02c5b5930c2c9ba3e5423fe12e2ef0155017297 (patch) | |
tree | fd60ebbbb5299e16e5fca8c773ddb74f764760db /vendor/url/src/lib.rs | |
parent | Adding debian version 1.73.0+dfsg1-1. (diff) | |
download | rustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.tar.xz rustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/url/src/lib.rs')
-rw-r--r-- | vendor/url/src/lib.rs | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/vendor/url/src/lib.rs b/vendor/url/src/lib.rs index ad3c89001..58c7c07cd 100644 --- a/vendor/url/src/lib.rs +++ b/vendor/url/src/lib.rs @@ -119,12 +119,24 @@ See [serde documentation](https://serde.rs) for more information. url = { version = "2", features = ["serde"] } ``` +# Feature: `debugger_visualizer` + +If you enable the `debugger_visualizer` feature, the `url` crate will include +a [natvis file](https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects) +for [Visual Studio](https://www.visualstudio.com/) that allows you to view +[`Url`](struct.Url.html) objects in the debugger. + +This feature requires Rust 1.71 or later. + +```toml +url = { version = "2", features = ["debugger_visualizer"] } +``` + */ -#![doc(html_root_url = "https://docs.rs/url/2.4.0")] +#![doc(html_root_url = "https://docs.rs/url/2.4.1")] #![cfg_attr( feature = "debugger_visualizer", - feature(debugger_visualizer), debugger_visualizer(natvis_file = "../../debug_metadata/url.natvis") )] @@ -1486,7 +1498,7 @@ impl Url { if let Some(input) = fragment { self.fragment_start = Some(to_u32(self.serialization.len()).unwrap()); self.serialization.push('#'); - self.mutate(|parser| parser.parse_fragment(parser::Input::no_trim(input))) + self.mutate(|parser| parser.parse_fragment(parser::Input::new_no_trim(input))) } else { self.fragment_start = None; self.strip_trailing_spaces_from_opaque_path(); @@ -1549,7 +1561,7 @@ impl Url { parser.parse_query( scheme_type, scheme_end, - parser::Input::trim_tab_and_newlines(input, vfn), + parser::Input::new_trim_tab_and_newlines(input, vfn), ) }); } else { @@ -1670,10 +1682,14 @@ impl Url { parser.serialization.push_str("%2F"); path = &path[1..]; } - parser.parse_cannot_be_a_base_path(parser::Input::new(path)); + parser.parse_cannot_be_a_base_path(parser::Input::new_no_trim(path)); } else { let mut has_host = true; // FIXME - parser.parse_path_start(scheme_type, &mut has_host, parser::Input::new(path)); + parser.parse_path_start( + scheme_type, + &mut has_host, + parser::Input::new_no_trim(path), + ); } }); self.restore_after_path(old_after_path_pos, &after_path); @@ -2343,7 +2359,7 @@ impl Url { #[allow(clippy::result_unit_err, clippy::suspicious_operation_groupings)] pub fn set_scheme(&mut self, scheme: &str) -> Result<(), ()> { let mut parser = Parser::for_setter(String::new()); - let remaining = parser.parse_scheme(parser::Input::new(scheme))?; + let remaining = parser.parse_scheme(parser::Input::new_no_trim(scheme))?; let new_scheme_type = SchemeType::from(&parser.serialization); let old_scheme_type = SchemeType::from(self.scheme()); // If url’s scheme is a special scheme and buffer is not a special scheme, then return. |