From 71d6bdf03e6e8567f9cdfa4ccd2a9b9d3136d0ae Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 19 Apr 2026 02:37:37 +0900 Subject: [PATCH] docs(web): tweak docs for `full_url` (#4032) --- actix-web/src/request.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/actix-web/src/request.rs b/actix-web/src/request.rs index 5e86f11a2..08be38ca6 100644 --- a/actix-web/src/request.rs +++ b/actix-web/src/request.rs @@ -89,7 +89,10 @@ impl HttpRequest { } /// This method returns mutable reference to the request head. - /// panics if multiple references of HTTP request exists. + /// + /// # Panics + /// + /// Panics if multiple references of HTTP request exists. #[inline] pub(crate) fn head_mut(&mut self) -> &mut RequestHead { &mut Rc::get_mut(&mut self.inner).unwrap().head @@ -106,6 +109,12 @@ impl HttpRequest { /// Reconstructed URL is best-effort, using [`connection_info`](HttpRequest::connection_info()) /// to get forwarded scheme & host. /// + /// # Panics + /// + /// Panics when the reconstructed URL cannot be parsed, such as when the host is malformed. + /// + /// # Examples + /// /// ``` /// use actix_web::test::TestRequest; /// let req = TestRequest::with_uri("http://10.1.2.3:8443/api?id=4&name=foo")