Skip to content

Commit f5e7706

Browse files
committed
merge: fix formatting in Merge method doc comments
Rustdoc was losing the formatting of the merge diagrams in `Merge::flatten()`'s doc comment; preserve it with an HTML `<pre>` block. Also remove a stray backtick that broke formatting in `Merge::to_file_merge()`'s doc comment.
1 parent 5947632 commit f5e7706

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/merge.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,15 +486,19 @@ impl<T> Merge<Merge<T>> {
486486
///
487487
/// Let's say we have a 3-way merge of 3-way merges like this:
488488
///
489+
/// ```text
489490
/// 4 5 7 8
490491
/// 3 6
491492
/// 1 2
492493
/// 0
494+
/// ```
493495
///
494496
/// Flattening that results in this 9-way merge:
495497
///
498+
/// ```text
496499
/// 4 5 0 7 8
497500
/// 3 2 1 6
501+
/// ```
498502
pub fn flatten(self) -> Merge<T> {
499503
let mut outer_values = self.values.into_iter();
500504
let mut result = outer_values.next().unwrap();
@@ -577,7 +581,7 @@ where
577581
}
578582

579583
/// If this merge contains only files or absent entries, returns a merge of
580-
/// the `FileId`s`. The executable bits and copy IDs will be ignored. Use
584+
/// the `FileId`s. The executable bits and copy IDs will be ignored. Use
581585
/// `Merge::with_new_file_ids()` to produce a new merge with the original
582586
/// executable bits preserved.
583587
pub fn to_file_merge(&self) -> Option<Merge<Option<FileId>>> {

0 commit comments

Comments
 (0)