Spaces:
Runtime error
Runtime error
Merge branch 'rolling' into optimize-and-make-code-idiomatic
Browse files- .github/workflows/rust.yml +25 -22
- .github/workflows/rust_format.yml +3 -0
- Cargo.lock +27 -39
- Cargo.toml +1 -1
.github/workflows/rust.yml
CHANGED
@@ -4,10 +4,10 @@ name: Rust
|
|
4 |
on:
|
5 |
push:
|
6 |
branches:
|
7 |
-
-
|
8 |
pull_request:
|
9 |
branches:
|
10 |
-
-
|
11 |
|
12 |
env:
|
13 |
CARGO_TERM_COLOR: always
|
@@ -21,23 +21,26 @@ jobs:
|
|
21 |
- stable
|
22 |
|
23 |
steps:
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
4 |
on:
|
5 |
push:
|
6 |
branches:
|
7 |
+
- '**'
|
8 |
pull_request:
|
9 |
branches:
|
10 |
+
- 'rolling'
|
11 |
|
12 |
env:
|
13 |
CARGO_TERM_COLOR: always
|
|
|
21 |
- stable
|
22 |
|
23 |
steps:
|
24 |
+
- uses: leafo/gh-actions-lua@v10
|
25 |
+
with:
|
26 |
+
luaVersion: 'luajit'
|
27 |
+
- uses: actions/checkout@v3
|
28 |
+
- run: rustup toolchain install stable --profile minimal
|
29 |
+
- uses: Swatinem/rust-cache@v2
|
30 |
+
with:
|
31 |
+
prefix-key: ''
|
32 |
+
shared-key: ''
|
33 |
+
key: ''
|
34 |
+
env-vars: ''
|
35 |
+
workspaces: ''
|
36 |
+
cache-directories: ''
|
37 |
+
cache-targets: ''
|
38 |
+
cache-on-failure: ''
|
39 |
+
cache-all-crates: ''
|
40 |
+
save-if: ''
|
41 |
+
- uses: actions/checkout@v3
|
42 |
+
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
43 |
+
- name: Build
|
44 |
+
run: cargo build --verbose
|
45 |
+
- name: Run tests
|
46 |
+
run: cargo test --verbose
|
.github/workflows/rust_format.yml
CHANGED
@@ -13,6 +13,9 @@ jobs:
|
|
13 |
name: Rust project
|
14 |
runs-on: ubuntu-latest
|
15 |
steps:
|
|
|
|
|
|
|
16 |
- uses: actions/checkout@v2
|
17 |
- name: Install minimal stable with clippy and rustfmt
|
18 |
uses: actions-rs/toolchain@v1
|
|
|
13 |
name: Rust project
|
14 |
runs-on: ubuntu-latest
|
15 |
steps:
|
16 |
+
- uses: leafo/gh-actions-lua@v10
|
17 |
+
with:
|
18 |
+
luaVersion: 'luajit'
|
19 |
- uses: actions/checkout@v2
|
20 |
- name: Install minimal stable with clippy and rustfmt
|
21 |
uses: actions-rs/toolchain@v1
|
Cargo.lock
CHANGED
@@ -59,9 +59,9 @@ dependencies = [
|
|
59 |
|
60 |
[[package]]
|
61 |
name = "actix-http"
|
62 |
-
version = "3.
|
63 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
64 |
-
checksum = "
|
65 |
dependencies = [
|
66 |
"actix-codec",
|
67 |
"actix-rt",
|
@@ -69,7 +69,7 @@ dependencies = [
|
|
69 |
"actix-utils",
|
70 |
"ahash 0.8.3",
|
71 |
"base64 0.21.3",
|
72 |
-
"bitflags
|
73 |
"brotli",
|
74 |
"bytes 1.4.0",
|
75 |
"bytestring",
|
@@ -169,9 +169,9 @@ dependencies = [
|
|
169 |
|
170 |
[[package]]
|
171 |
name = "actix-web"
|
172 |
-
version = "4.
|
173 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
174 |
-
checksum = "
|
175 |
dependencies = [
|
176 |
"actix-codec",
|
177 |
"actix-http",
|
@@ -182,7 +182,7 @@ dependencies = [
|
|
182 |
"actix-service",
|
183 |
"actix-utils",
|
184 |
"actix-web-codegen",
|
185 |
-
"ahash
|
186 |
"bytes 1.4.0",
|
187 |
"bytestring",
|
188 |
"cfg-if 1.0.0",
|
@@ -191,7 +191,6 @@ dependencies = [
|
|
191 |
"encoding_rs",
|
192 |
"futures-core",
|
193 |
"futures-util",
|
194 |
-
"http 0.2.9",
|
195 |
"itoa 1.0.9",
|
196 |
"language-tags",
|
197 |
"log",
|
@@ -203,21 +202,21 @@ dependencies = [
|
|
203 |
"serde_json",
|
204 |
"serde_urlencoded 0.7.1",
|
205 |
"smallvec 1.11.0",
|
206 |
-
"socket2 0.
|
207 |
"time 0.3.28",
|
208 |
-
"url 2.4.
|
209 |
]
|
210 |
|
211 |
[[package]]
|
212 |
name = "actix-web-codegen"
|
213 |
-
version = "4.2.
|
214 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
215 |
-
checksum = "
|
216 |
dependencies = [
|
217 |
"actix-router",
|
218 |
"proc-macro2 1.0.66",
|
219 |
"quote 1.0.33",
|
220 |
-
"syn
|
221 |
]
|
222 |
|
223 |
[[package]]
|
@@ -235,17 +234,6 @@ version = "1.0.2"
|
|
235 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
236 |
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
237 |
|
238 |
-
[[package]]
|
239 |
-
name = "ahash"
|
240 |
-
version = "0.7.6"
|
241 |
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
242 |
-
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
|
243 |
-
dependencies = [
|
244 |
-
"getrandom",
|
245 |
-
"once_cell",
|
246 |
-
"version_check",
|
247 |
-
]
|
248 |
-
|
249 |
[[package]]
|
250 |
name = "ahash"
|
251 |
version = "0.8.3"
|
@@ -544,18 +532,18 @@ dependencies = [
|
|
544 |
|
545 |
[[package]]
|
546 |
name = "clap"
|
547 |
-
version = "4.4.
|
548 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
549 |
-
checksum = "
|
550 |
dependencies = [
|
551 |
"clap_builder",
|
552 |
]
|
553 |
|
554 |
[[package]]
|
555 |
name = "clap_builder"
|
556 |
-
version = "4.4.
|
557 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
558 |
-
checksum = "
|
559 |
dependencies = [
|
560 |
"anstyle",
|
561 |
"clap_lex",
|
@@ -941,9 +929,9 @@ dependencies = [
|
|
941 |
|
942 |
[[package]]
|
943 |
name = "errno"
|
944 |
-
version = "0.3.
|
945 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
946 |
-
checksum = "
|
947 |
dependencies = [
|
948 |
"errno-dragonfly",
|
949 |
"libc",
|
@@ -1735,9 +1723,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
|
|
1735 |
|
1736 |
[[package]]
|
1737 |
name = "memchr"
|
1738 |
-
version = "2.
|
1739 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1740 |
-
checksum = "
|
1741 |
|
1742 |
[[package]]
|
1743 |
name = "memoffset"
|
@@ -2315,7 +2303,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2315 |
checksum = "95b4ce31ff0a27d93c8de1849cf58162283752f065a90d508f1105fa6c9a213f"
|
2316 |
dependencies = [
|
2317 |
"idna 0.2.3",
|
2318 |
-
"url 2.4.
|
2319 |
]
|
2320 |
|
2321 |
[[package]]
|
@@ -2524,7 +2512,7 @@ dependencies = [
|
|
2524 |
"tokio 1.32.0",
|
2525 |
"tokio-retry",
|
2526 |
"tokio-util",
|
2527 |
-
"url 2.4.
|
2528 |
]
|
2529 |
|
2530 |
[[package]]
|
@@ -2635,7 +2623,7 @@ dependencies = [
|
|
2635 |
"tokio 1.32.0",
|
2636 |
"tokio-native-tls",
|
2637 |
"tower-service",
|
2638 |
-
"url 2.4.
|
2639 |
"wasm-bindgen",
|
2640 |
"wasm-bindgen-futures",
|
2641 |
"web-sys",
|
@@ -2674,9 +2662,9 @@ dependencies = [
|
|
2674 |
|
2675 |
[[package]]
|
2676 |
name = "rustix"
|
2677 |
-
version = "0.38.
|
2678 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2679 |
-
checksum = "
|
2680 |
dependencies = [
|
2681 |
"bitflags 2.4.0",
|
2682 |
"errno",
|
@@ -2733,7 +2721,7 @@ version = "0.17.1"
|
|
2733 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2734 |
checksum = "c95a930e03325234c18c7071fd2b60118307e025d6fff3e12745ffbf63a3d29c"
|
2735 |
dependencies = [
|
2736 |
-
"ahash
|
2737 |
"cssparser",
|
2738 |
"ego-tree",
|
2739 |
"getopts",
|
@@ -3552,9 +3540,9 @@ dependencies = [
|
|
3552 |
|
3553 |
[[package]]
|
3554 |
name = "url"
|
3555 |
-
version = "2.4.
|
3556 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3557 |
-
checksum = "
|
3558 |
dependencies = [
|
3559 |
"form_urlencoded",
|
3560 |
"idna 0.4.0",
|
|
|
59 |
|
60 |
[[package]]
|
61 |
name = "actix-http"
|
62 |
+
version = "3.4.0"
|
63 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
64 |
+
checksum = "a92ef85799cba03f76e4f7c10f533e66d87c9a7e7055f3391f09000ad8351bc9"
|
65 |
dependencies = [
|
66 |
"actix-codec",
|
67 |
"actix-rt",
|
|
|
69 |
"actix-utils",
|
70 |
"ahash 0.8.3",
|
71 |
"base64 0.21.3",
|
72 |
+
"bitflags 2.4.0",
|
73 |
"brotli",
|
74 |
"bytes 1.4.0",
|
75 |
"bytestring",
|
|
|
169 |
|
170 |
[[package]]
|
171 |
name = "actix-web"
|
172 |
+
version = "4.4.0"
|
173 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
174 |
+
checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9"
|
175 |
dependencies = [
|
176 |
"actix-codec",
|
177 |
"actix-http",
|
|
|
182 |
"actix-service",
|
183 |
"actix-utils",
|
184 |
"actix-web-codegen",
|
185 |
+
"ahash",
|
186 |
"bytes 1.4.0",
|
187 |
"bytestring",
|
188 |
"cfg-if 1.0.0",
|
|
|
191 |
"encoding_rs",
|
192 |
"futures-core",
|
193 |
"futures-util",
|
|
|
194 |
"itoa 1.0.9",
|
195 |
"language-tags",
|
196 |
"log",
|
|
|
202 |
"serde_json",
|
203 |
"serde_urlencoded 0.7.1",
|
204 |
"smallvec 1.11.0",
|
205 |
+
"socket2 0.5.3",
|
206 |
"time 0.3.28",
|
207 |
+
"url 2.4.1",
|
208 |
]
|
209 |
|
210 |
[[package]]
|
211 |
name = "actix-web-codegen"
|
212 |
+
version = "4.2.1"
|
213 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
214 |
+
checksum = "8cc9afd177d10afc1e7842eaf6b8b24a38f4d22088b197a2b9395b102c4413eb"
|
215 |
dependencies = [
|
216 |
"actix-router",
|
217 |
"proc-macro2 1.0.66",
|
218 |
"quote 1.0.33",
|
219 |
+
"syn 2.0.29",
|
220 |
]
|
221 |
|
222 |
[[package]]
|
|
|
234 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
235 |
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
[[package]]
|
238 |
name = "ahash"
|
239 |
version = "0.8.3"
|
|
|
532 |
|
533 |
[[package]]
|
534 |
name = "clap"
|
535 |
+
version = "4.4.1"
|
536 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
537 |
+
checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27"
|
538 |
dependencies = [
|
539 |
"clap_builder",
|
540 |
]
|
541 |
|
542 |
[[package]]
|
543 |
name = "clap_builder"
|
544 |
+
version = "4.4.1"
|
545 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
546 |
+
checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d"
|
547 |
dependencies = [
|
548 |
"anstyle",
|
549 |
"clap_lex",
|
|
|
929 |
|
930 |
[[package]]
|
931 |
name = "errno"
|
932 |
+
version = "0.3.3"
|
933 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
934 |
+
checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd"
|
935 |
dependencies = [
|
936 |
"errno-dragonfly",
|
937 |
"libc",
|
|
|
1723 |
|
1724 |
[[package]]
|
1725 |
name = "memchr"
|
1726 |
+
version = "2.6.1"
|
1727 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1728 |
+
checksum = "f478948fd84d9f8e86967bf432640e46adfb5a4bd4f14ef7e864ab38220534ae"
|
1729 |
|
1730 |
[[package]]
|
1731 |
name = "memoffset"
|
|
|
2303 |
checksum = "95b4ce31ff0a27d93c8de1849cf58162283752f065a90d508f1105fa6c9a213f"
|
2304 |
dependencies = [
|
2305 |
"idna 0.2.3",
|
2306 |
+
"url 2.4.1",
|
2307 |
]
|
2308 |
|
2309 |
[[package]]
|
|
|
2512 |
"tokio 1.32.0",
|
2513 |
"tokio-retry",
|
2514 |
"tokio-util",
|
2515 |
+
"url 2.4.1",
|
2516 |
]
|
2517 |
|
2518 |
[[package]]
|
|
|
2623 |
"tokio 1.32.0",
|
2624 |
"tokio-native-tls",
|
2625 |
"tower-service",
|
2626 |
+
"url 2.4.1",
|
2627 |
"wasm-bindgen",
|
2628 |
"wasm-bindgen-futures",
|
2629 |
"web-sys",
|
|
|
2662 |
|
2663 |
[[package]]
|
2664 |
name = "rustix"
|
2665 |
+
version = "0.38.10"
|
2666 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2667 |
+
checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964"
|
2668 |
dependencies = [
|
2669 |
"bitflags 2.4.0",
|
2670 |
"errno",
|
|
|
2721 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2722 |
checksum = "c95a930e03325234c18c7071fd2b60118307e025d6fff3e12745ffbf63a3d29c"
|
2723 |
dependencies = [
|
2724 |
+
"ahash",
|
2725 |
"cssparser",
|
2726 |
"ego-tree",
|
2727 |
"getopts",
|
|
|
3540 |
|
3541 |
[[package]]
|
3542 |
name = "url"
|
3543 |
+
version = "2.4.1"
|
3544 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3545 |
+
checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
|
3546 |
dependencies = [
|
3547 |
"form_urlencoded",
|
3548 |
"idna 0.4.0",
|
Cargo.toml
CHANGED
@@ -12,7 +12,7 @@ tokio = {version="1.32.0",features=["rt-multi-thread","macros"]}
|
|
12 |
serde = {version="1.0.188",features=["derive"]}
|
13 |
handlebars = { version = "4.3.7", features = ["dir_source"] }
|
14 |
scraper = {version="0.17.1"}
|
15 |
-
actix-web = {version="4.
|
16 |
actix-files = {version="0.6.2"}
|
17 |
actix-cors = {version="0.6.4"}
|
18 |
serde_json = {version="1.0.105"}
|
|
|
12 |
serde = {version="1.0.188",features=["derive"]}
|
13 |
handlebars = { version = "4.3.7", features = ["dir_source"] }
|
14 |
scraper = {version="0.17.1"}
|
15 |
+
actix-web = {version="4.4.0", features = ["cookies"]}
|
16 |
actix-files = {version="0.6.2"}
|
17 |
actix-cors = {version="0.6.4"}
|
18 |
serde_json = {version="1.0.105"}
|