refactor: 引入 enum_dispatch 静态分发,提升性能 (#232)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2025-01-24 13:44:27 +08:00
committed by GitHub
parent 9e5a8b0573
commit 40cf22a7fa
10 changed files with 79 additions and 67 deletions

13
Cargo.lock generated
View File

@@ -392,6 +392,7 @@ dependencies = [
"cookie",
"cow-utils",
"dirs",
"enum_dispatch",
"float-ord",
"futures",
"handlebars",
@@ -889,6 +890,18 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "enum_dispatch"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd"
dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.96",
]
[[package]]
name = "equivalent"
version = "1.0.1"