Skip to content

Commit

Permalink
Document nested block comments and add more intra docs links (ron-rs#440
Browse files Browse the repository at this point in the history
)
  • Loading branch information
juntyr committed Aug 16, 2023
1 parent e7fbdf8 commit 7e73961
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/value/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ impl RawValue {
&self.ron
}

/// Helper function to validate a RON string and turn it into a `RawValue`.
/// Helper function to validate a RON string and turn it into a
/// [`RawValue`].
pub fn from_ron(ron: &str) -> SpannedResult<&Self> {
Options::default()
.from_str::<&Self>(ron)
.map(|_| Self::from_borrowed_str(ron))
}

/// Helper function to validate a RON string and turn it into a `RawValue`.
/// Helper function to validate a RON string and turn it into a
/// [`RawValue`].
pub fn from_boxed_ron(ron: Box<str>) -> SpannedResult<Box<Self>> {
match Options::default().from_str::<&Self>(&ron) {
Ok(_) => Ok(Self::from_boxed_str(ron)),
Expand Down

0 comments on commit 7e73961

Please sign in to comment.