From 823a137a76dca649cdf8e3f2602e107bca359b4d Mon Sep 17 00:00:00 2001 From: Bauke Date: Sat, 23 May 2020 18:21:21 +0200 Subject: [PATCH] Fix doc comments. --- Cargo.toml | 2 +- source/lib.rs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7bf05b3..34fb5a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "opml" authors = ["Holllo "] -version = "0.1.0" +version = "0.1.1" license = "MIT/Apache-2.0" description = "An OPML 2.0 parser for Rust." repository = "https://gitlab.com/holllo/opml-rs" diff --git a/source/lib.rs b/source/lib.rs index e0cb5db..6c1f7ee 100644 --- a/source/lib.rs +++ b/source/lib.rs @@ -3,19 +3,19 @@ use regex::Regex; use strong_xml::{XmlError, XmlRead, XmlWrite}; -/// is an XML element, with a single required attribute, version; a element and a element, both of which are required. +/// `` is an XML element, with a single required attribute, version; a `` element and a `` element, both of which are required. #[derive(XmlWrite, XmlRead, PartialEq, Debug)] #[xml(tag = "opml")] pub struct OPML { - /// The version attribute is a version string, of the form, x.y, where x and y are both numeric strings. + /// The version attribute is a version string, of the form, x.y, where x and y are both numeric strings. #[xml(attr = "version")] pub version: String, - /// A contains zero or more optional elements. + /// A `` contains zero or more optional elements. #[xml(child = "head")] pub head: Head, - /// A contains one or more elements. + /// A `` contains one or more `` elements. #[xml(child = "body")] pub body: Body, } @@ -43,7 +43,7 @@ impl OPML { )); } - // SPEC: A contains one or more elements. + // SPEC: A `` contains one or more `` elements. if opml.body.outlines.is_empty() { return Err("OPML body has no outlines.".to_string()); } @@ -52,7 +52,7 @@ impl OPML { } } -/// A contains zero or more optional elements. +/// A `` contains zero or more optional elements. #[derive(XmlWrite, XmlRead, PartialEq, Debug)] #[xml(tag = "head")] pub struct Head { @@ -109,7 +109,7 @@ pub struct Head { pub window_right: Option, } -/// A contains one or more elements. +/// A `` contains one or more `` elements. #[derive(XmlWrite, XmlRead, PartialEq, Debug)] #[xml(tag = "body")] pub struct Body { @@ -118,7 +118,7 @@ pub struct Body { pub outlines: Vec, } -/// An is an XML element containing at least one required attribute, text, and zero or more additional attributes. An may contain zero or more sub-elements. No attribute may be repeated within the same element. +/// An `` is an XML element containing at least one required attribute, text, and zero or more additional attributes. An `` may contain zero or more `` sub-elements. No attribute may be repeated within the same `` element. #[derive(XmlWrite, XmlRead, PartialEq, Debug)] #[xml(tag = "outline")] pub struct Outline { @@ -127,7 +127,7 @@ pub struct Outline { #[xml(attr = "text")] pub text: String, - /// A string that says how the other attributes of the are interpreted. + /// A string that says how the other attributes of the `` are interpreted. #[xml(attr = "type")] pub r#type: Option,