-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from OneSignal/update-magnus
Update to Magnus 0.6.2 (latest)
- Loading branch information
Showing
20 changed files
with
96 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name = "serde_magnus" | |
version = "0.2.2" | ||
description = "Serde integration for Magnus" | ||
edition = "2018" | ||
rust-version = "1.51" | ||
rust-version = "1.65" | ||
authors = ["George Claghorn <[email protected]>"] | ||
repository = "https://github.com/georgeclaghorn/serde-magnus" | ||
homepage = "https://github.com/georgeclaghorn/serde-magnus" | ||
|
@@ -16,12 +16,12 @@ exclude = [".gitignore", ".github"] | |
|
||
[dependencies] | ||
serde = "1.0, <= 1.0.156" | ||
magnus = "0.5" | ||
rb-sys = "0.9, <= 0.9.71" | ||
rb-sys-build = "0.9, <= 0.9.71" | ||
magnus = "0.6.2" | ||
rb-sys = "0.9, <= 0.9.81" | ||
rb-sys-build = "0.9, <= 0.9.81" | ||
tap = "1.0" | ||
|
||
[dev-dependencies] | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_bytes = "0.11" | ||
magnus = { version = "0.5", features = ["embed"] } | ||
magnus = { version = "0.6.2", features = ["embed"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
use crate::error::Error; | ||
use magnus::{RHash, Value}; | ||
use std::ops::Deref; | ||
use magnus::{IntoValue, RHash, Value}; | ||
|
||
pub fn nest<Data>(variant: &'static str, data: Data) -> Result<Value, Error> | ||
where | ||
Data: Deref<Target = Value>, | ||
Data: IntoValue, | ||
{ | ||
let hash = RHash::new(); | ||
hash.aset(variant, *data)?; | ||
Ok(*hash) | ||
hash.aset(variant, data)?; | ||
Ok(hash.into_value()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.