From 7abcdc09d82ccc03e150bccaf2b750c5074a787a Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 31 Jan 2021 19:29:05 +0100 Subject: [PATCH] Added documentation updates --- README.md | 2 +- src/lib.rs | 2 +- src/text/mod.rs | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1656312..4c2f508 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ fn main() { ChangeTag::Insert => "+", ChangeTag::Equal => " ", }; - print!("{}{}", sign, change.value()); + print!("{}{}", sign, change); } } } diff --git a/src/lib.rs b/src/lib.rs index 09ddb3f..4703aaa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ //! ChangeTag::Insert => "+", //! ChangeTag::Equal => " ", //! }; -//! print!("{}{}", sign, change.value()); +//! print!("{}{}", sign, change); //! } //! } //! # } diff --git a/src/text/mod.rs b/src/text/mod.rs index d373416..238e401 100644 --- a/src/text/mod.rs +++ b/src/text/mod.rs @@ -475,6 +475,13 @@ impl<'old, 'new, 'bufs> TextDiff<'old, 'new, 'bufs> { }) } + /// Iterates over the changes the op expands to with inline emphasis. + /// + /// This is very similar to [`iter_changes`] but it performs a second + /// level per-character diff on adjacent line replacements. The exact + /// behavior of this function with regards to how it detects those + /// inline changes is currently not defined and will likely change + /// over time. pub fn iter_inline_changes(&self, op: &DiffOp) -> impl Iterator { iter_inline_changes(self, op) }