Skip to content

Commit

Permalink
Merge branch 'remove-anyhow' of https://github.com/Mingun/serde-yaml-ng
Browse files Browse the repository at this point in the history
Signed-off-by: Antoine Catton <[email protected]>
  • Loading branch information
acatton committed Sep 22, 2024
2 parents 5b40bf9 + 2f9fc73 commit e158e71
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ These contributors could not be identified by any legal name:
"toasteater" (github.com/toasteater)
"cetra3" (github.com/cetra3)
"masinc" (github.com/masinc)
"Mingun" (github.com/Mingun)
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ serde = "1.0.195"
unsafe-libyaml = "0.2.11"

[dev-dependencies]
anyhow = "1.0.79"
indoc = "2.0"
serde_derive = "1.0.195"

Expand Down
10 changes: 4 additions & 6 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ type Result<T, E = Error> = std::result::Result<T, E>;
/// Deserializing a single document:
///
/// ```
/// use anyhow::Result;
/// use serde::Deserialize;
/// use serde_yaml_ng::Value;
/// use serde_yaml_ng::{Deserializer, Result, Value};
///
/// fn main() -> Result<()> {
/// let input = "k: 107\n";
/// let de = serde_yaml_ng::Deserializer::from_str(input);
/// let de = Deserializer::from_str(input);
/// let value = Value::deserialize(de)?;
/// println!("{:?}", value);
/// Ok(())
Expand All @@ -40,14 +39,13 @@ type Result<T, E = Error> = std::result::Result<T, E>;
/// Deserializing multi-doc YAML:
///
/// ```
/// use anyhow::Result;
/// use serde::Deserialize;
/// use serde_yaml_ng::Value;
/// use serde_yaml_ng::{Deserializer, Result, Value};
///
/// fn main() -> Result<()> {
/// let input = "---\nk: 107\n...\n---\nj: 106\n";
///
/// for document in serde_yaml_ng::Deserializer::from_str(input) {
/// for document in Deserializer::from_str(input) {
/// let value = Value::deserialize(document)?;
/// println!("{:?}", value);
/// }
Expand Down
4 changes: 2 additions & 2 deletions src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ type Result<T, E = Error> = std::result::Result<T, E>;
/// # Example
///
/// ```
/// use anyhow::Result;
/// use serde::Serialize;
/// use std::collections::BTreeMap;
/// use serde_yaml_ng::{Result, Serializer};
///
/// fn main() -> Result<()> {
/// let mut buffer = Vec::new();
/// let mut ser = serde_yaml_ng::Serializer::new(&mut buffer);
/// let mut ser = Serializer::new(&mut buffer);
///
/// let mut object = BTreeMap::new();
/// object.insert("k", 107);
Expand Down

0 comments on commit e158e71

Please sign in to comment.