Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ schemars = { version = "0.8", optional = true, default-features = false }
serde = { version = "1", optional = true, default-features = false }
serde_json = { version = "1", optional = true }
serde_urlencoded = { version = "0.7", optional = true }
serde_yaml = { version = "0.9", optional = true }
serde_yaml_ng = { version = "0.10", optional = true }
thiserror = "2"
toml = { version = "0.9", optional = true }
validator = { version = "0.20", optional = true }
Expand Down Expand Up @@ -66,7 +66,7 @@ bitcode = ["dep:bitcode", "axum-codec-macros/bitcode"]
json = ["dep:serde_json", "serde"]
msgpack = ["dep:rmp-serde", "serde"]
toml = ["dep:toml", "serde"]
yaml = ["dep:serde_yaml", "serde"]
yaml = ["dep:serde_yaml_ng", "serde"]

# Should not be manually enabled, but will not cause any issues if it is.
serde = ["dep:serde", "axum-codec-macros/serde"]
Expand Down
6 changes: 3 additions & 3 deletions src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ where
///
/// # Errors
///
/// See [`serde_yaml::from_slice`].
/// See [`serde_yaml_ng::from_slice`].
#[cfg(feature = "yaml")]
#[inline]
pub fn from_yaml(text: &'b str) -> Result<Self, serde_yaml::Error> {
serde_yaml::from_str(text).map(Self)
pub fn from_yaml(text: &'b str) -> Result<Self, serde_yaml_ng::Error> {
serde_yaml_ng::from_str(text).map(Self)
}

/// Attempts to deserialize the given text as [TOML](https://toml.io).
Expand Down
8 changes: 4 additions & 4 deletions src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub enum Error {
Bincode(#[from] bincode::error::EncodeError),
#[cfg(feature = "yaml")]
#[error(transparent)]
Yaml(#[from] serde_yaml::Error),
Yaml(#[from] serde_yaml_ng::Error),
#[cfg(feature = "toml")]
#[error(transparent)]
Toml(#[from] toml::ser::Error),
Expand Down Expand Up @@ -106,11 +106,11 @@ where
///
/// # Errors
///
/// See [`serde_yaml::to_vec`].
/// See [`serde_yaml_ng::to_vec`].
#[cfg(feature = "yaml")]
#[inline]
pub fn to_yaml(&self) -> Result<String, serde_yaml::Error> {
serde_yaml::to_string(&self.0)
pub fn to_yaml(&self) -> Result<String, serde_yaml_ng::Error> {
serde_yaml_ng::to_string(&self.0)
}

/// Attempts to serialize the given value as [TOML](https://toml.io).
Expand Down
2 changes: 1 addition & 1 deletion src/rejection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub enum CodecRejection {
Bitcode(#[from] bitcode::Error),
#[cfg(feature = "yaml")]
#[error(transparent)]
Yaml(#[from] serde_yaml::Error),
Yaml(#[from] serde_yaml_ng::Error),
#[cfg(feature = "toml")]
#[error(transparent)]
Toml(#[from] toml::de::Error),
Expand Down