diff --git a/contrib/dyn_templates/Cargo.toml b/contrib/dyn_templates/Cargo.toml index f34bcd1b55..9a0eea923a 100644 --- a/contrib/dyn_templates/Cargo.toml +++ b/contrib/dyn_templates/Cargo.toml @@ -22,7 +22,7 @@ minijinja = ["dep:minijinja"] [dependencies] walkdir = "2.4" -notify = "6" +notify = "7" normpath = "1" tera = { version = "1.19.0", optional = true } diff --git a/contrib/ws/Cargo.toml b/contrib/ws/Cargo.toml index 079b36322d..63bbf3940c 100644 --- a/contrib/ws/Cargo.toml +++ b/contrib/ws/Cargo.toml @@ -20,7 +20,7 @@ default = ["tungstenite"] tungstenite = ["tokio-tungstenite"] [dependencies] -tokio-tungstenite = { version = "0.23", optional = true } +tokio-tungstenite = { version = "0.24", optional = true } [dependencies.rocket] version = "0.6.0-dev" diff --git a/core/http/src/raw_str.rs b/core/http/src/raw_str.rs index 3606502bd6..88e7a44f7c 100644 --- a/core/http/src/raw_str.rs +++ b/core/http/src/raw_str.rs @@ -258,19 +258,9 @@ impl RawStr { /// # extern crate rocket; /// use rocket::http::RawStr; /// - /// let raw_str = RawStr::new("Hello%21"); - /// let decoded = raw_str.percent_decode(); - /// assert_eq!(decoded, Ok("Hello!".into())); - /// ``` - /// - /// With an invalid string: - /// - /// ```rust - /// # extern crate rocket; - /// use rocket::http::RawStr; - /// - /// let bad_raw_str = RawStr::new("%FF"); - /// assert!(bad_raw_str.percent_decode().is_err()); + /// let raw_str = RawStr::new("Hello/goodbye"); + /// let encoded = raw_str.percent_encode(); + /// assert_eq!(encoded.as_str(), "Hello%2Fgoodbye"); /// ``` #[inline(always)] pub fn percent_encode(&self) -> Cow<'_, RawStr> { @@ -288,6 +278,7 @@ impl RawStr { /// // Note: Rocket should never hand you a bad `&RawStr`. /// let bytes = &[93, 12, 0, 13, 1]; /// let encoded = RawStr::percent_encode_bytes(&bytes[..]); + /// assert_eq!(encoded.as_str(), "]%0C%00%0D%01"); /// ``` #[inline(always)] pub fn percent_encode_bytes(bytes: &[u8]) -> Cow<'_, RawStr> { diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index e02707740e..714d17ea1c 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -122,14 +122,14 @@ version = "2.1.0" optional = true [dependencies.s2n-quic] -version = "1.36" +version = "1.51" default-features = false features = ["provider-address-token-default", "provider-tls-rustls"] optional = true [dependencies.s2n-quic-h3] git = "https://github.com/SergioBenitez/s2n-quic-h3.git" -rev = "6613956" +rev = "f832471" optional = true [target.'cfg(unix)'.dependencies] diff --git a/core/lib/src/listener/tcp.rs b/core/lib/src/listener/tcp.rs index 61252c7d79..bdf337ee18 100644 --- a/core/lib/src/listener/tcp.rs +++ b/core/lib/src/listener/tcp.rs @@ -24,7 +24,7 @@ impl Bind for TcpListener { type Error = Either; async fn bind(rocket: &Rocket) -> Result { - let endpoint = Self::bind_endpoint(&rocket)?; + let endpoint = Self::bind_endpoint(rocket)?; let addr = endpoint.tcp() .ok_or_else(|| io::Error::other("internal error: invalid endpoint")) .map_err(Right)?; diff --git a/core/lib/src/listener/unix.rs b/core/lib/src/listener/unix.rs index a6992a7acc..37a22b9dda 100644 --- a/core/lib/src/listener/unix.rs +++ b/core/lib/src/listener/unix.rs @@ -75,7 +75,7 @@ impl Bind for UnixListener { type Error = Either; async fn bind(rocket: &Rocket) -> Result { - let endpoint = Self::bind_endpoint(&rocket)?; + let endpoint = Self::bind_endpoint(rocket)?; let path = endpoint.unix() .ok_or_else(|| Right(io::Error::other("internal error: invalid endpoint")))?; diff --git a/core/lib/src/request/from_param.rs b/core/lib/src/request/from_param.rs index f639d38efb..ac701eb8f2 100644 --- a/core/lib/src/request/from_param.rs +++ b/core/lib/src/request/from_param.rs @@ -39,7 +39,7 @@ use crate::http::uri::{Segments, error::PathError, fmt::Path}; /// If `usize::from_param` returns an `Ok(usize)` variant, the encapsulated /// value is used as the `id` function parameter. If not, the request is /// forwarded to the next matching route. Since there are no additional matching -/// routes, this example will result in a 404 error for requests with invalid +/// routes, this example will result in a 422 error for requests with invalid /// `id` values. /// /// # Catching Errors diff --git a/core/lib/src/sentinel.rs b/core/lib/src/sentinel.rs index 2ac1ec9af3..c825b299e8 100644 --- a/core/lib/src/sentinel.rs +++ b/core/lib/src/sentinel.rs @@ -159,7 +159,7 @@ use crate::{Rocket, Ignite}; /// /// **Note:** _Rocket actively discourages using `impl Trait` in route /// signatures. In addition to impeding sentinel discovery, doing so decreases -/// the ability to gleam a handler's functionality based on its type signature._ +/// the ability to glean a handler's functionality based on its type signature._ /// /// The return type of the route `f` depends on its implementation. At present, /// it is not possible to name the underlying concrete type of an `impl Trait` diff --git a/docs/guide/05-requests.md b/docs/guide/05-requests.md index d3ad9792cd..5e8e0bcf95 100644 --- a/docs/guide/05-requests.md +++ b/docs/guide/05-requests.md @@ -876,7 +876,7 @@ use rocket::data::{Data, ToByteUnit}; #[post("/debug", data = "")] async fn debug(data: Data<'_>) -> std::io::Result<()> { - // Stream at most 512KiB all of the body data to stdout. + // Stream at most 512KiB of the body data to stdout. data.open(512.kibibytes()) .stream_to(tokio::io::stdout()) .await?; diff --git a/docs/guide/10-configuration.md b/docs/guide/10-configuration.md index 02218bb5f0..ffe018eac5 100644 --- a/docs/guide/10-configuration.md +++ b/docs/guide/10-configuration.md @@ -6,7 +6,7 @@ summary = "overview and customization of Rocket application configuration" Rocket's configuration system is flexible. Based on [Figment](@figment), it allows you to configure your application the way _you_ want while also providing -with a sensible set of defaults. +a sensible set of defaults. ## Overview diff --git a/scripts/test.sh b/scripts/test.sh index 612c4659be..13df52cdc2 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -169,17 +169,17 @@ function test_default() { indir "${BENCHMARKS_ROOT}" $CARGO update indir "${BENCHMARKS_ROOT}" $CARGO check --benches --all-features $@ - echo ":: Checking fuzzers..." - indir "${FUZZ_ROOT}" $CARGO update - indir "${FUZZ_ROOT}" $CARGO check --all --all-features $@ - case "$OSTYPE" in darwin* | linux*) echo ":: Checking testbench..." indir "${TESTBENCH_ROOT}" $CARGO update indir "${TESTBENCH_ROOT}" $CARGO check $@ + + echo ":: Checking fuzzers..." + indir "${FUZZ_ROOT}" $CARGO update + indir "${FUZZ_ROOT}" $CARGO check --all --all-features $@ ;; - *) echo ":: Skipping testbench [$OSTYPE]" ;; + *) echo ":: Skipping testbench, fuzzers [$OSTYPE]" ;; esac }