Dogfood tests

This commit is contained in:
Oliver Schneider
2017-04-12 10:55:34 +02:00
parent 3534149035
commit 7ee0d4f9c2
2 changed files with 16 additions and 10 deletions

View File

@@ -1093,6 +1093,7 @@ pub fn align_two_snippets(s: &str, t: &str) -> String {
///
/// For example, consider
///
/// ```
/// let s1 = "\
/// if (condition()) {
/// do_something()";
@@ -1103,18 +1104,19 @@ pub fn align_two_snippets(s: &str, t: &str) -> String {
/// let s3 = "\
/// another_piece_of_code();
/// indented_here();";
///
/// ```
///
///
///
/// Now calling `align_snippets(&[s1, s2, s3])` will yield the following:
///
/// "\
/// ```
/// if (condition()) {
/// do_something();
/// code_from_somewhere_else();
/// another_piece_of_code();
/// indented_here();"
/// indented_here();
/// ```
pub fn align_snippets(xs: &[&str]) -> String {
if xs.is_empty() {
String::from("")