mirror of https://github.com/rwf2/Rocket.git
Fix min dependency versions. Update MSRV to 1.64.
Also includes a work-around for a buggy `format_args!` macro found in rustc 1.67 and 1.68. Resolves #2670.
This commit is contained in:
parent
92a2559a9a
commit
a59f3c4c1f
|
@ -8,7 +8,7 @@ readme = "../README.md"
|
|||
keywords = ["rocket", "framework", "database", "pools"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
|
|
@ -8,7 +8,7 @@ readme = "../README.md"
|
|||
keywords = ["rocket", "framework", "database", "pools"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
|
|
@ -10,7 +10,7 @@ readme = "README.md"
|
|||
keywords = ["rocket", "framework", "templates", "templating", "engine"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[features]
|
||||
tera = ["tera_"]
|
||||
|
|
|
@ -8,7 +8,7 @@ readme = "../README.md"
|
|||
keywords = ["rocket", "framework", "database", "pools"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
|
|
@ -8,7 +8,7 @@ readme = "../README.md"
|
|||
keywords = ["rocket", "framework", "database", "pools"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[features]
|
||||
diesel_sqlite_pool = ["diesel/sqlite", "diesel/r2d2"]
|
||||
|
@ -31,7 +31,7 @@ r2d2_postgres = { version = "0.18", optional = true }
|
|||
rusqlite = { version = "0.29.0", optional = true }
|
||||
r2d2_sqlite = { version = "0.22.0", optional = true }
|
||||
|
||||
memcache = { version = "0.15", optional = true }
|
||||
memcache = { version = "0.15.2", optional = true }
|
||||
r2d2-memcache = { version = "0.6", optional = true }
|
||||
|
||||
[dependencies.rocket_sync_db_pools_codegen]
|
||||
|
|
|
@ -10,7 +10,7 @@ readme = "README.md"
|
|||
keywords = ["rocket", "web", "framework", "websocket"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[features]
|
||||
default = ["tungstenite"]
|
||||
|
|
|
@ -245,8 +245,8 @@ impl<'r, S> IoHandler for MessageStream<'r, S>
|
|||
{
|
||||
async fn io(self: Pin<Box<Self>>, io: IoStream) -> io::Result<()> {
|
||||
let (mut sink, source) = DuplexStream::new(io, self.ws.config).await.split();
|
||||
let handler = Pin::into_inner(self).handler;
|
||||
let mut stream = std::pin::pin!((handler)(source));
|
||||
let stream = (Pin::into_inner(self).handler)(source);
|
||||
rocket::tokio::pin!(stream);
|
||||
while let Some(msg) = stream.next().await {
|
||||
let result = match msg {
|
||||
Ok(msg) => sink.send(msg).await,
|
||||
|
|
|
@ -10,7 +10,7 @@ readme = "../../README.md"
|
|||
keywords = ["rocket", "web", "framework", "code", "generation"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
@ -19,7 +19,7 @@ proc-macro = true
|
|||
indexmap = "2"
|
||||
quote = "1.0"
|
||||
syn = { version = "2.0", features = ["full", "visit", "visit-mut", "extra-traits"] }
|
||||
proc-macro2 = "1.0.27"
|
||||
proc-macro2 = "1.0.60"
|
||||
devise = "0.4"
|
||||
rocket_http = { version = "0.6.0-dev", path = "../http/" }
|
||||
unicode-xid = "0.2"
|
||||
|
|
|
@ -13,7 +13,7 @@ keywords = ["rocket", "web", "framework", "http"]
|
|||
license = "MIT OR Apache-2.0"
|
||||
categories = ["web-programming"]
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
@ -38,7 +38,7 @@ log = "0.4"
|
|||
ref-cast = "1.0"
|
||||
uncased = "0.9.6"
|
||||
either = "1"
|
||||
pear = "0.2.3"
|
||||
pear = "0.2.8"
|
||||
pin-project-lite = "0.2"
|
||||
memchr = "2"
|
||||
stable-pattern = "0.1"
|
||||
|
|
|
@ -14,7 +14,7 @@ license = "MIT OR Apache-2.0"
|
|||
build = "build.rs"
|
||||
categories = ["web-programming::http-server"]
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.64"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -46,7 +46,7 @@ binascii = "0.1"
|
|||
ref-cast = "1.0"
|
||||
atomic = "0.5"
|
||||
parking_lot = "0.12"
|
||||
ubyte = {version = "0.10", features = ["serde"] }
|
||||
ubyte = {version = "0.10.2", features = ["serde"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
figment = { version = "0.10.6", features = ["toml", "env"] }
|
||||
rand = "0.8"
|
||||
|
@ -56,7 +56,7 @@ indexmap = { version = "2", features = ["serde"] }
|
|||
tempfile = "3"
|
||||
async-trait = "0.1.43"
|
||||
async-stream = "0.3.2"
|
||||
multer = { version = "2", features = ["tokio-io"] }
|
||||
multer = { version = "3.0.0", features = ["tokio-io"] }
|
||||
tokio-stream = { version = "0.1.6", features = ["signal", "time"] }
|
||||
state = "0.6"
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
fn main() {
|
||||
if let Some(true) = version_check::is_feature_flaggable() {
|
||||
if let Some((version, channel, _)) = version_check::triple() {
|
||||
if channel.supports_features() {
|
||||
println!("cargo:rustc-cfg=nightly");
|
||||
}
|
||||
|
||||
if version.at_least("1.67") && version.at_most("1.68.2") {
|
||||
println!("cargo:rustc-cfg=broken_fmt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,9 @@ async fn hyper_service_fn(
|
|||
// sends the response metadata (and a body channel) prior.
|
||||
let (tx, rx) = oneshot::channel();
|
||||
|
||||
debug!("Received request: {:#?}", hyp_req);
|
||||
#[cfg(not(broken_fmt))]
|
||||
debug!("received request: {:#?}", hyp_req);
|
||||
|
||||
tokio::spawn(async move {
|
||||
// We move the request next, so get the upgrade future now.
|
||||
let pending_upgrade = hyper::upgrade::on(&mut hyp_req);
|
||||
|
@ -160,7 +162,9 @@ impl Rocket<Orbit> {
|
|||
let hyp_response = hyp_res.body(hyp_body)
|
||||
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
|
||||
|
||||
#[cfg(not(broken_fmt))]
|
||||
debug!("sending response: {:#?}", hyp_response);
|
||||
|
||||
tx.send(hyp_response).map_err(|_| {
|
||||
let msg = "client disconnect before response started";
|
||||
io::Error::new(io::ErrorKind::BrokenPipe, msg)
|
||||
|
|
Loading…
Reference in New Issue