Skip to content

Commit aa52f5e

Browse files
committed
ci: fix up testing the guides
1 parent 119bec0 commit aa52f5e

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/workflows/check_guides.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/bin/sh
1+
#!/bin/bash
2+
3+
status=0
24

35
for value in legacy stable; do
46
if [ ! -e "$value/Cargo.toml" ]; then
@@ -11,7 +13,6 @@ for value in legacy stable; do
1113
case "$value" in
1214
legacy)
1315
cat >> "$value/Cargo.toml" <<-EOF
14-
[dependencies]
1516
futures = "0.3"
1617
hyper = { version = "0.14", features = ["full"] }
1718
hyper-tls = "0.5"
@@ -20,7 +21,6 @@ EOF
2021
;;
2122
stable)
2223
cat >> "$value/Cargo.toml" <<-EOF
23-
[dependencies]
2424
hyper = { version = "1", features = ["full"] }
2525
tokio = { version = "1", features = ["full"] }
2626
http-body-util = "0.1"
@@ -43,7 +43,6 @@ EOF
4343
exit $?
4444
fi
4545

46-
status=0
4746
for f in $(git ls-files | grep "^_$value\/.*\.md$"); do
4847
test_file "$f"
4948
s=$?

_stable/client/post.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For the body, we have a couple of options. We can use a simple string, a JSON st
1919
# extern crate hyper;
2020
# extern crate hyper_util;
2121
# extern crate tokio;
22-
# use http_body_util::Empty;
22+
# use http_body_util::{Empty, Full};
2323
# use hyper::body::Bytes;
2424
# use hyper::Request;
2525
# use hyper_util::rt::TokioIo;
@@ -74,4 +74,4 @@ println!("Response status: {}", res.status());
7474
# Ok(())
7575
# }
7676
# fn main() {}
77-
```
77+
```

_stable/server/middleware.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
244244
});
245245
}
246246
}
247-
247+
# }
248248
# fn main() {}
249249
```
250250

0 commit comments

Comments
 (0)