diff --git a/src/headline.rs b/src/headline.rs index 2d8f183..bcf1ec3 100644 --- a/src/headline.rs +++ b/src/headline.rs @@ -169,7 +169,7 @@ impl Document { /// d.set_section_content("s", &mut org); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -250,7 +250,7 @@ impl Document { /// assert!(d.append(h4, &mut org).is_ok()); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -313,7 +313,7 @@ impl Document { /// assert!(d.prepend(h1, &mut org).is_ok()); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -456,7 +456,7 @@ impl Headline { /// h1.title_mut(&mut org).priority = Some('A'); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// "* [#A] h1\n", @@ -494,7 +494,7 @@ impl Headline { /// assert!(h1_2.set_level(5, &mut org).is_ok()); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -560,7 +560,7 @@ impl Headline { /// h1_1.set_title_content(String::from("*H1_1*"), &mut org); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -624,7 +624,7 @@ impl Headline { /// h1_1.set_section_content(String::from("*s1_1*"), &mut org); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -903,7 +903,7 @@ impl Headline { /// h1_2.detach(&mut org); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -958,7 +958,7 @@ impl Headline { /// assert!(h1_1.append(h1_1_2, &mut org).is_ok()); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -1079,7 +1079,7 @@ impl Headline { /// assert!(h1_1_3.insert_before(h1_1_2, &mut org).is_ok()); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" @@ -1147,7 +1147,7 @@ impl Headline { /// assert!(h1_1_1.insert_after(h1_1_2, &mut org).is_ok()); /// /// let mut writer = Vec::new(); - /// org.org(&mut writer).unwrap(); + /// org.write_org(&mut writer).unwrap(); /// assert_eq!( /// String::from_utf8(writer).unwrap(), /// r#" diff --git a/src/org.rs b/src/org.rs index 442ce82..bd3d62f 100644 --- a/src/org.rs +++ b/src/org.rs @@ -54,12 +54,6 @@ impl<'a> Org<'a> { org } - /// Parses string `text` into `Org` struct with custom `ParseConfig`. - #[deprecated(since = "0.6.0", note = "rename to parse_custom")] - pub fn parse_with_config(text: &'a str, config: &ParseConfig) -> Org<'a> { - Org::parse_custom(text, config) - } - /// Returns a refrence to the underlay arena. pub fn arena(&self) -> &Arena> { &self.arena @@ -114,26 +108,6 @@ impl<'a> Org<'a> { Ok(()) } - /// Writes an `Org` struct as html format. - #[deprecated(since = "0.6.0", note = "rename to write_html")] - pub fn html(&self, writer: W) -> Result<(), Error> - where - W: Write, - { - self.write_html_custom(writer, &mut DefaultHtmlHandler) - } - - /// Writes an `Org` struct as html format with custom `HtmlHandler`. - #[deprecated(since = "0.6.0", note = "rename to write_html_custom")] - pub fn html_with_handler(&self, writer: W, handler: &mut H) -> Result<(), E> - where - W: Write, - E: From, - H: HtmlHandler, - { - self.write_html_custom(writer, handler) - } - /// Writes an `Org` struct as org format. pub fn write_org(&self, writer: W) -> Result<(), Error> where @@ -158,26 +132,6 @@ impl<'a> Org<'a> { Ok(()) } - - /// Writes an `Org` struct as org format. - #[deprecated(since = "0.6.0", note = "rename to write_org")] - pub fn org(&self, writer: W) -> Result<(), Error> - where - W: Write, - { - self.write_org_custom(writer, &mut DefaultOrgHandler) - } - - /// Writes an `Org` struct as org format with custom `OrgHandler`. - #[deprecated(since = "0.6.0", note = "rename to write_org_custom")] - pub fn org_with_handler(&self, writer: W, handler: &mut H) -> Result<(), E> - where - W: Write, - E: From, - H: OrgHandler, - { - self.write_org_custom(writer, handler) - } } impl Default for Org<'static> { diff --git a/src/validate.rs b/src/validate.rs index f3b46b2..1130655 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -200,12 +200,6 @@ impl Org<'_> { errors } - #[deprecated(since = "0.3.1", note = "rename to validate")] - /// Validates an `Org` struct. - pub fn check(&self) -> Vec { - self.validate() - } - pub(crate) fn debug_validate(&self) { if cfg!(debug_assertions) { let errors = self.validate();