Skip to content

Commit dff5bf2

Browse files
committed
fmt + sort
Support actix-web: use version of zxtd exactly
1 parent ae5ef0a commit dff5bf2

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

cargo-shuttle/src/init.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ pub trait ShuttleInit {
2323

2424
pub struct ShuttleInitActixWeb;
2525

26+
impl ShuttleInitActixWeb {
27+
fn get_zstd_dep(_: &str, _: bool, _: &Path, _: &Url) -> String {
28+
// it does not compile in the case of the latest dependency
29+
String::from("=2.0.1+zstd.1.5.2")
30+
}
31+
}
32+
2633
impl ShuttleInit for ShuttleInitActixWeb {
2734
fn set_cargo_dependencies(
2835
&self,
@@ -45,7 +52,7 @@ impl ShuttleInit for ShuttleInitActixWeb {
4552
manifest_path,
4653
url,
4754
false,
48-
get_dependency_version_fn,
55+
Self::get_zstd_dep,
4956
);
5057

5158
set_inline_table_dependency_features(
@@ -974,7 +981,7 @@ mod shuttle_init_tests {
974981
[dependencies]
975982
shuttle-service = { version = "1.0", features = ["web-actix-web"] }
976983
actix-web = "1.0"
977-
zstd-sys = "1.0"
984+
zstd-sys = "=2.0.1+zstd.1.5.2"
978985
"#};
979986

980987
assert_eq!(cargo_toml.to_string(), expected);

examples

0 commit comments

Comments
 (0)