Skip to content

Commit

Permalink
Bump the cargo group with 2 updates (#132)
Browse files Browse the repository at this point in the history
* Bump the cargo group with 2 updates

Bumps the cargo group with 2 updates: [serde](https://github.com/serde-rs/serde) and [serde_json](https://github.com/serde-rs/json).


Updates `serde` from 1.0.204 to 1.0.209
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.204...v1.0.209)

Updates `serde_json` from 1.0.121 to 1.0.127
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.121...1.0.127)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <[email protected]>

* fixed clippy errors

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken Matsui <[email protected]>
  • Loading branch information
dependabot[bot] and ken-matsui authored Sep 2, 2024
1 parent c7f4a3c commit c5d8f08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions src/c_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::os::raw::c_char;
pub unsafe extern "C" fn to_json(from: ext::Ext, input: *const c_char) -> *mut c_char {
let input = CStr::from_ptr(input);
let deserialized = ext::deserialize::<ext::json::Value>(from, input.to_str().unwrap());
let serialized = CString::new(ext::json::serialize(&deserialized.unwrap()).unwrap()).unwrap();
let serialized = CString::new(ext::json::serialize(deserialized.unwrap()).unwrap()).unwrap();
serialized.into_raw()
}

Expand All @@ -25,7 +25,7 @@ pub unsafe extern "C" fn to_json(from: ext::Ext, input: *const c_char) -> *mut c
pub unsafe extern "C" fn to_yaml(from: ext::Ext, input: *const c_char) -> *mut c_char {
let input = CStr::from_ptr(input);
let deserialized = ext::deserialize::<ext::yaml::Value>(from, input.to_str().unwrap());
let serialized = CString::new(ext::yaml::serialize(&deserialized.unwrap()).unwrap()).unwrap();
let serialized = CString::new(ext::yaml::serialize(deserialized.unwrap()).unwrap()).unwrap();
serialized.into_raw()
}

Expand All @@ -38,7 +38,7 @@ pub unsafe extern "C" fn to_yaml(from: ext::Ext, input: *const c_char) -> *mut c
pub unsafe extern "C" fn to_toml(from: ext::Ext, input: *const c_char) -> *mut c_char {
let input = CStr::from_ptr(input);
let deserialized = ext::deserialize::<ext::toml::Value>(from, input.to_str().unwrap());
let serialized = CString::new(ext::toml::serialize(&deserialized.unwrap()).unwrap()).unwrap();
let serialized = CString::new(ext::toml::serialize(deserialized.unwrap()).unwrap()).unwrap();
serialized.into_raw()
}

Expand Down

0 comments on commit c5d8f08

Please sign in to comment.