| @@ -218,7 +218,7 @@ pub struct Events<'a> { · 217 unmodified lines |
| 218 | 218 | |
| 219 | 219 | impl Events<'static> { |
| 220 | 220 | /// Parses a git config located at the provided path. On success, returns a |
| 221 | | − /// [`State`] that provides methods to accessing leading comments and sections |
| 221 | + /// [`Events`] that provides methods to accessing leading comments and sections |
| 222 | 222 | /// of a `git-config` file and can be converted into an iterator of [`Event`] |
| 223 | 223 | /// for higher level processing. |
| 224 | 224 | /// |
| @@ -239,8 +239,8 @@ impl Events<'static> { · 14 unmodified lines |
| 239 | 239 | crate::parse::nom::from_bytes_owned(&bytes).map_err(from_path::Error::Parse) |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | | − /// Parses the provided bytes, returning an [`State`] that contains allocated |
| 243 | | − /// and owned events. This is similar to [`State::from_bytes()`], but performance |
| 242 | + /// Parses the provided bytes, returning an [`Events`] that contains allocated |
| 243 | + /// and owned events. This is similar to [`Events::from_bytes()`], but performance |
| 244 | 244 | /// is degraded as it requires allocation for every event. However, this permits |
| 245 | 245 | /// the reference bytes to be dropped, allowing the parser to be passed around |
| 246 | 246 | /// without lifetime worries. |
| @@ -258,7 +258,7 @@ impl Events<'static> { · 11 unmodified lines |
| 258 | 258 | |
| 259 | 259 | impl<'a> Events<'a> { |
| 260 | 260 | /// Attempt to zero-copy parse the provided `&str`. On success, returns a |
| 261 | | − /// [`State`] that provides methods to accessing leading comments and sections |
| 261 | + /// [`Events`] that provides methods to accessing leading comments and sections |
| 262 | 262 | /// of a `git-config` file and can be converted into an iterator of [`Event`] |
| 263 | 263 | /// for higher level processing. |
| 264 | 264 | /// |
| @@ -273,7 +273,7 @@ impl<'a> Events<'a> { · 8 unmodified lines |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | /// Attempt to zero-copy parse the provided bytes. On success, returns a |
| 276 | | − /// [`State`] that provides methods to accessing leading comments and sections |
| 276 | + /// [`Events`] that provides methods to accessing leading comments and sections |
| 277 | 277 | /// of a `git-config` file and can be converted into an iterator of [`Event`] |
| 278 | 278 | /// for higher level processing. |
| 279 | 279 | /// |
| @@ -290,7 +290,7 @@ impl<'a> Events<'a> { · 10 unmodified lines |
| 290 | 290 | |
| 291 | 291 | impl<'a> Events<'a> { |
| 292 | 292 | /// Returns the leading events (any comments, whitespace, or newlines before |
| 293 | | − /// a section) from the parser. Consider [`State::take_frontmatter`] if |
| 293 | + /// a section) from the parser. Consider [`Events::take_frontmatter`] if |
| 294 | 294 | /// you need an owned copy only once. If that function was called, then this |
| 295 | 295 | /// will always return an empty slice. |
| 296 | 296 | #[must_use] |
| @@ -300,14 +300,14 @@ impl<'a> Events<'a> { · 3 unmodified lines |
| 300 | 300 | |
| 301 | 301 | /// Takes the leading events (any comments, whitespace, or newlines before |
| 302 | 302 | /// a section) from the parser. Subsequent calls will return an empty vec. |
| 303 | | − /// Consider [`State::frontmatter`] if you only need a reference to the |
| 303 | + /// Consider [`Events::frontmatter`] if you only need a reference to the |
| 304 | 304 | /// frontmatter |
| 305 | 305 | pub fn take_frontmatter(&mut self) -> Vec<Event<'a>> { |
| 306 | 306 | std::mem::take(&mut self.frontmatter) |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | /// Returns the parsed sections from the parser. Consider |
| 310 | | − /// [`State::take_sections`] if you need an owned copy only once. If that |
| 310 | + /// [`Events::take_sections`] if you need an owned copy only once. If that |
| 311 | 311 | /// function was called, then this will always return an empty slice. |
| 312 | 312 | #[must_use] |
| 313 | 313 | pub fn sections(&self) -> &[Section<'a>] { |
| @@ -315,7 +315,7 @@ impl<'a> Events<'a> { · 1 unmodified line |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /// Takes the parsed sections from the parser. Subsequent calls will return |
| 318 | | − /// an empty vec. Consider [`State::sections`] if you only need a reference |
| 318 | + /// an empty vec. Consider [`Events::sections`] if you only need a reference |
| 319 | 319 | /// to the comments. |
| 320 | 320 | pub fn take_sections(&mut self) -> Vec<Section<'a>> { |
| 321 | 321 | let mut to_return = vec![]; |