Skip to content

Commit

Permalink
perf: Use enum_dispatch over dynamic dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Oct 8, 2024
1 parent 5e1e5e7 commit 468ad8c
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 622 deletions.
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ strum_macros = "0.26"
cfg-if = "1.0.0"
libflate = "2.0.0"
form_urlencoded = "1.2.1"
enum_dispatch = "0.3.13"

[dependencies.hyper-util]
version = "0.1"
Expand Down Expand Up @@ -236,4 +237,4 @@ schemars = { version = "0.8.15", features = ["bytes", "url"] }
url = { version = "2.4.1", features = ["serde"] }

[workspace.lints.clippy]
undocumented_unsafe_blocks = "deny"
undocumented_unsafe_blocks = "deny"
9 changes: 1 addition & 8 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ version:
@echo $(package_version)

# Run all tests
test: ensure-build-image test-quilkin test-examples test-docs
test: ensure-build-image test-quilkin test-docs

# In CI with split jobs that both fetch they will fail if run in parallel since
# cargo will be fighting with itself for some the same host directory that is
Expand All @@ -103,13 +103,6 @@ test-quilkin: ensure-build-image
--network=host \
-e RUST_BACKTRACE=1 --entrypoint=cargo $(BUILD_IMAGE_TAG) test -p quilkin -p qt

# Run tests against the examples
test-examples: ensure-build-image
docker run --rm $(common_rust_args) -w /workspace/examples/quilkin-filter-example \
--entrypoint=cargo $(BUILD_IMAGE_TAG) clippy --tests -- -D warnings
docker run --rm $(common_rust_args) -w /workspace/examples/quilkin-filter-example \
--entrypoint=cargo $(BUILD_IMAGE_TAG) fmt -- --check

# Run tests against documentation
test-docs: ensure-build-image
test-docs: GITHUB_REF_NAME ?= main
Expand Down
3 changes: 1 addition & 2 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
- [Pass](./services/proxy/filters/pass.md)
- [Timestamp](./services/proxy/filters/timestamp.md)
- [Token Router](./services/proxy/filters/token_router.md)
- [Writing Custom Filters](./services/proxy/filters/writing_custom_filters.md)
- [Control Message Protocol](./services/proxy/qcmp.md)
- [Metrics](./services/proxy/metrics.md)

Expand Down Expand Up @@ -55,4 +54,4 @@

# Third Party

- [Videos and Presentations](./third-party/presentations.md)
- [Videos and Presentations](./third-party/presentations.md)
277 changes: 0 additions & 277 deletions docs/src/services/proxy/filters/writing_custom_filters.md

This file was deleted.

34 changes: 0 additions & 34 deletions examples/quilkin-filter-example/.gitignore

This file was deleted.

Loading

0 comments on commit 468ad8c

Please sign in to comment.