Skip to content

Commit

Permalink
chore(deps): add dependency camino
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
josecelano committed May 10, 2024
1 parent fc191f7 commit a2e718b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ axum = { version = "0", features = ["macros"] }
axum-client-ip = "0"
axum-extra = { version = "0", features = ["query"] }
axum-server = { version = "0", features = ["tls-rustls"] }
camino = { version = "1.1.6", features = ["serde"] }
chrono = { version = "0", default-features = false, features = ["clock"] }
clap = { version = "4", features = ["derive", "env"] }
crossbeam-skiplist = "0.1"
Expand Down
1 change: 1 addition & 0 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"Buildx",
"byteorder",
"callgrind",
"camino",
"canonicalize",
"canonicalized",
"certbot",
Expand Down
1 change: 1 addition & 0 deletions packages/configuration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rust-version.workspace = true
version.workspace = true

[dependencies]
camino = { version = "1.1.6", features = ["serde"] }
derive_more = "0"
figment = { version = "0.10.18", features = ["env", "test", "toml"] }
serde = { version = "1", features = ["derive"] }
Expand Down

0 comments on commit a2e718b

Please sign in to comment.