Skip to content

Commit

Permalink
fmt + sort
Browse files Browse the repository at this point in the history
Support actix-web: use version of zxtd exactly
  • Loading branch information
biryukovmaxim committed Nov 28, 2022
1 parent ae5ef0a commit f51c578
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions cargo-shuttle/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ pub trait ShuttleInit {

pub struct ShuttleInitActixWeb;

impl ShuttleInitActixWeb {
fn get_zstd_dep(_: &str, _: bool, _: &Path, _: &Url) -> String {
// it does not compile in the case of the latest dependency
String::from("=2.0.1+zstd.1.5.2")
}
}

impl ShuttleInit for ShuttleInitActixWeb {
fn set_cargo_dependencies(
&self,
Expand All @@ -45,7 +52,7 @@ impl ShuttleInit for ShuttleInitActixWeb {
manifest_path,
url,
false,
get_dependency_version_fn,
Self::get_zstd_dep,
);

set_inline_table_dependency_features(
Expand Down Expand Up @@ -974,7 +981,7 @@ mod shuttle_init_tests {
[dependencies]
shuttle-service = { version = "1.0", features = ["web-actix-web"] }
actix-web = "1.0"
zstd-sys = "1.0"
zstd-sys = "=2.0.1+zstd.1.5.2"
"#};

assert_eq!(cargo_toml.to_string(), expected);
Expand Down
2 changes: 1 addition & 1 deletion examples
2 changes: 1 addition & 1 deletion service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ tracing = "0.1.36"
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
uuid = { version = "1.1.2", features = ["v4"] }
warp = { version = "0.3.2", optional = true }
zstd-sys = { version = "2.0.1+zstd.1.5.2", optional = true }
zstd-sys = { version = "=2.0.1+zstd.1.5.2", optional = true }

# Tide does not have tokio support. So make sure async-std is compatible with tokio
# https://github.com/http-rs/tide/issues/791
Expand Down

0 comments on commit f51c578

Please sign in to comment.