Skip to content

Commit 81461b4

Browse files
authored
Merge branch 'rwf2:master' into issue_1067_typed_headers
2 parents 368288e + 28891e8 commit 81461b4

File tree

11 files changed

+19
-28
lines changed

11 files changed

+19
-28
lines changed

contrib/dyn_templates/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ minijinja = ["dep:minijinja"]
2222

2323
[dependencies]
2424
walkdir = "2.4"
25-
notify = "6"
25+
notify = "7"
2626
normpath = "1"
2727

2828
tera = { version = "1.19.0", optional = true }

contrib/ws/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ default = ["tungstenite"]
2020
tungstenite = ["tokio-tungstenite"]
2121

2222
[dependencies]
23-
tokio-tungstenite = { version = "0.23", optional = true }
23+
tokio-tungstenite = { version = "0.24", optional = true }
2424

2525
[dependencies.rocket]
2626
version = "0.6.0-dev"

core/http/src/raw_str.rs

+4-13
Original file line numberDiff line numberDiff line change
@@ -258,19 +258,9 @@ impl RawStr {
258258
/// # extern crate rocket;
259259
/// use rocket::http::RawStr;
260260
///
261-
/// let raw_str = RawStr::new("Hello%21");
262-
/// let decoded = raw_str.percent_decode();
263-
/// assert_eq!(decoded, Ok("Hello!".into()));
264-
/// ```
265-
///
266-
/// With an invalid string:
267-
///
268-
/// ```rust
269-
/// # extern crate rocket;
270-
/// use rocket::http::RawStr;
271-
///
272-
/// let bad_raw_str = RawStr::new("%FF");
273-
/// assert!(bad_raw_str.percent_decode().is_err());
261+
/// let raw_str = RawStr::new("Hello/goodbye");
262+
/// let encoded = raw_str.percent_encode();
263+
/// assert_eq!(encoded.as_str(), "Hello%2Fgoodbye");
274264
/// ```
275265
#[inline(always)]
276266
pub fn percent_encode(&self) -> Cow<'_, RawStr> {
@@ -288,6 +278,7 @@ impl RawStr {
288278
/// // Note: Rocket should never hand you a bad `&RawStr`.
289279
/// let bytes = &[93, 12, 0, 13, 1];
290280
/// let encoded = RawStr::percent_encode_bytes(&bytes[..]);
281+
/// assert_eq!(encoded.as_str(), "]%0C%00%0D%01");
291282
/// ```
292283
#[inline(always)]
293284
pub fn percent_encode_bytes(bytes: &[u8]) -> Cow<'_, RawStr> {

core/lib/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ version = "2.1.0"
122122
optional = true
123123

124124
[dependencies.s2n-quic]
125-
version = "1.36"
125+
version = "1.51"
126126
default-features = false
127127
features = ["provider-address-token-default", "provider-tls-rustls"]
128128
optional = true
129129

130130
[dependencies.s2n-quic-h3]
131131
git = "https://github.com/SergioBenitez/s2n-quic-h3.git"
132-
rev = "6613956"
132+
rev = "f832471"
133133
optional = true
134134

135135
[target.'cfg(unix)'.dependencies]

core/lib/src/listener/tcp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl Bind for TcpListener {
2424
type Error = Either<figment::Error, io::Error>;
2525

2626
async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error> {
27-
let endpoint = Self::bind_endpoint(&rocket)?;
27+
let endpoint = Self::bind_endpoint(rocket)?;
2828
let addr = endpoint.tcp()
2929
.ok_or_else(|| io::Error::other("internal error: invalid endpoint"))
3030
.map_err(Right)?;

core/lib/src/listener/unix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl Bind for UnixListener {
7575
type Error = Either<figment::Error, io::Error>;
7676

7777
async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error> {
78-
let endpoint = Self::bind_endpoint(&rocket)?;
78+
let endpoint = Self::bind_endpoint(rocket)?;
7979
let path = endpoint.unix()
8080
.ok_or_else(|| Right(io::Error::other("internal error: invalid endpoint")))?;
8181

core/lib/src/request/from_param.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use crate::http::uri::{Segments, error::PathError, fmt::Path};
3939
/// If `usize::from_param` returns an `Ok(usize)` variant, the encapsulated
4040
/// value is used as the `id` function parameter. If not, the request is
4141
/// forwarded to the next matching route. Since there are no additional matching
42-
/// routes, this example will result in a 404 error for requests with invalid
42+
/// routes, this example will result in a 422 error for requests with invalid
4343
/// `id` values.
4444
///
4545
/// # Catching Errors

core/lib/src/sentinel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ use crate::{Rocket, Ignite};
159159
///
160160
/// **Note:** _Rocket actively discourages using `impl Trait` in route
161161
/// signatures. In addition to impeding sentinel discovery, doing so decreases
162-
/// the ability to gleam a handler's functionality based on its type signature._
162+
/// the ability to glean a handler's functionality based on its type signature._
163163
///
164164
/// The return type of the route `f` depends on its implementation. At present,
165165
/// it is not possible to name the underlying concrete type of an `impl Trait`

docs/guide/05-requests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ use rocket::data::{Data, ToByteUnit};
876876

877877
#[post("/debug", data = "<data>")]
878878
async fn debug(data: Data<'_>) -> std::io::Result<()> {
879-
// Stream at most 512KiB all of the body data to stdout.
879+
// Stream at most 512KiB of the body data to stdout.
880880
data.open(512.kibibytes())
881881
.stream_to(tokio::io::stdout())
882882
.await?;

docs/guide/10-configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ summary = "overview and customization of Rocket application configuration"
66

77
Rocket's configuration system is flexible. Based on [Figment](@figment), it
88
allows you to configure your application the way _you_ want while also providing
9-
with a sensible set of defaults.
9+
a sensible set of defaults.
1010

1111
## Overview
1212

scripts/test.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,17 @@ function test_default() {
169169
indir "${BENCHMARKS_ROOT}" $CARGO update
170170
indir "${BENCHMARKS_ROOT}" $CARGO check --benches --all-features $@
171171

172-
echo ":: Checking fuzzers..."
173-
indir "${FUZZ_ROOT}" $CARGO update
174-
indir "${FUZZ_ROOT}" $CARGO check --all --all-features $@
175-
176172
case "$OSTYPE" in
177173
darwin* | linux*)
178174
echo ":: Checking testbench..."
179175
indir "${TESTBENCH_ROOT}" $CARGO update
180176
indir "${TESTBENCH_ROOT}" $CARGO check $@
177+
178+
echo ":: Checking fuzzers..."
179+
indir "${FUZZ_ROOT}" $CARGO update
180+
indir "${FUZZ_ROOT}" $CARGO check --all --all-features $@
181181
;;
182-
*) echo ":: Skipping testbench [$OSTYPE]" ;;
182+
*) echo ":: Skipping testbench, fuzzers [$OSTYPE]" ;;
183183
esac
184184
}
185185

0 commit comments

Comments
 (0)