Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Touch up error type docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 31, 2021
1 parent 4bd371a commit 299c568
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ use std::string;
use yaml_rust::emitter;
use yaml_rust::scanner::{self, Marker, ScanError};

/// This type represents all possible errors that can occur when serializing or
/// deserializing YAML data.
/// An error that happened serializing or deserializing YAML data.
pub struct Error(Box<ErrorImpl>);

/// Alias for a `Result` with the error type `serde_yaml::Error`.
pub type Result<T> = result::Result<T, Error>;

/// This type represents all possible errors that can occur when serializing or
/// deserializing a value using YAML.
#[derive(Debug)]
pub enum ErrorImpl {
Message(String, Option<Pos>),
Expand All @@ -39,7 +36,7 @@ pub struct Pos {
path: String,
}

/// This type represents the location that an error occured.
/// The input location that an error occured.
#[derive(Debug)]
pub struct Location {
index: usize,
Expand Down

0 comments on commit 299c568

Please sign in to comment.