Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
- Map `/var/log/dmesg` files to Syslog syntax #3412 (@keith-hall)
- Add syntax definition and test file for Go modules(`go.mod` and `go.sum`) highlighting, see #3424 (@DarkMatter-999)
- Syntax highlighting for typescript code blocks within Markdown files, see #3435 (@MuntasirSZN)
- Replace `serde_yaml` with `serde_yaml_ng` v0.10.0, see #3480 (@Sachin-Bhat)

## Themes

Expand Down
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.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ unicode-width = "0.2.1"
globset = "0.4"
serde = "1.0"
serde_derive = "1.0"
serde_yaml = "0.9.28"
serde_yaml_ng = "0.10.0"
semver = "1.0"
path_abs = { version = "0.5", default-features = false }
clircle = { version = "0.6.1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion examples/yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn main() {
};

let mut bytes = Vec::with_capacity(128);
serde_yaml::to_writer(&mut bytes, &person).unwrap();
serde_yaml_ng::to_writer(&mut bytes, &person).unwrap();
PrettyPrinter::new()
.language("yaml")
.line_numbers(true)
Expand Down
4 changes: 2 additions & 2 deletions src/assets/assets_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ impl AssetsMetadata {
#[cfg(feature = "build-assets")]
pub(crate) fn save_to_folder(&self, path: &Path) -> Result<()> {
let file = File::create(path.join(FILENAME))?;
serde_yaml::to_writer(file, self)?;
serde_yaml_ng::to_writer(file, self)?;

Ok(())
}

fn try_load_from_folder(path: &Path) -> Result<Self> {
let file = File::open(path.join(FILENAME))?;
Ok(serde_yaml::from_reader(file)?)
Ok(serde_yaml_ng::from_reader(file)?)
}

/// Load metadata about the stored cache file from the given folder.
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub enum Error {
#[error(transparent)]
GlobParsingError(#[from] ::globset::Error),
#[error(transparent)]
SerdeYamlError(#[from] ::serde_yaml::Error),
SerdeYamlError(#[from] ::serde_yaml_ng::Error),
#[error("unable to detect syntax for {0}")]
UndetectedSyntax(String),
#[error("unknown syntax: '{0}'")]
Expand Down
4 changes: 2 additions & 2 deletions tests/github-actions.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[test]
fn all_jobs_not_missing_any_jobs() {
let yaml: serde_yaml::Value =
serde_yaml::from_reader(std::fs::File::open(".github/workflows/CICD.yml").unwrap())
let yaml: serde_yaml_ng::Value =
serde_yaml_ng::from_reader(std::fs::File::open(".github/workflows/CICD.yml").unwrap())
.unwrap();
let jobs = yaml.get("jobs").unwrap();

Expand Down
Loading