Skip to content

Commit a2e718b

Browse files
committed
chore(deps): add dependency camino
We are using `String` to represent a filepath. We are refactoring to enrich types in configuration. Filepath should be represented with `PathBuf` but it allows non UTF-8 chars, so it can't be serialized. Since we need to serialize config options (toml, json) is valid UTF-8 strings, we need a type that represents a valid fileptah but also is a valid UTF-8 strings. That makes impossible to use non-UTF8 fielpath. It seems that's a restriction accepted for a lot of projects including Rust `cargo`.
1 parent fc191f7 commit a2e718b

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ axum = { version = "0", features = ["macros"] }
3737
axum-client-ip = "0"
3838
axum-extra = { version = "0", features = ["query"] }
3939
axum-server = { version = "0", features = ["tls-rustls"] }
40+
camino = { version = "1.1.6", features = ["serde"] }
4041
chrono = { version = "0", default-features = false, features = ["clock"] }
4142
clap = { version = "4", features = ["derive", "env"] }
4243
crossbeam-skiplist = "0.1"

cSpell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"Buildx",
2626
"byteorder",
2727
"callgrind",
28+
"camino",
2829
"canonicalize",
2930
"canonicalized",
3031
"certbot",

packages/configuration/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ rust-version.workspace = true
1515
version.workspace = true
1616

1717
[dependencies]
18+
camino = { version = "1.1.6", features = ["serde"] }
1819
derive_more = "0"
1920
figment = { version = "0.10.18", features = ["env", "test", "toml"] }
2021
serde = { version = "1", features = ["derive"] }

0 commit comments

Comments
 (0)