nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: zhiburt/tabled
Pull request #360 (2023-09-28 02:57:31)

feat: Added new Style modern_round
modern_round is a rounded + HorizontalLine

zhiburt: Hi @Brijeshkrishna 

Could you add a test for it? (see `tabled/tests/style.rs`)
zhiburt: Hi @Brijeshkrishna 

Sorry it took that long;

Thanks for your contribution.

Patch:
diff --git a/tabled/src/settings/style/builder.rs b/tabled/src/settings/style/builder.rs
index d55c400..deae8c1 100644
--- a/tabled/src/settings/style/builder.rs
+++ b/tabled/src/settings/style/builder.rs
@@ -295,6 +295,36 @@ impl Style<(), (), (), (), (), (), (), ()> {
         )
     }
 
+    /// This style looks like a [`Style::round`] but with horizontal lines.
+    ///
+    /// Beware: It uses UTF-8 characters.
+    ///
+    /// ```text
+    ///     ╭────┬──────────────┬───────────────────────────╮
+    ///     │ id │ destribution │           link            │
+    ///     ├────┼──────────────┼───────────────────────────┤
+    ///     │ 0  │    Fedora    │  https://getfedora.org/   │
+    ///     ├────┼──────────────┼───────────────────────────┤    
+    ///     │ 2  │   OpenSUSE   │ https://www.opensuse.org/ │
+    ///     ├────┼──────────────┼───────────────────────────┤
+    ///     │ 3  │ Endeavouros  │ https://endeavouros.com/  │
+    ///     ╰────┴──────────────┴───────────────────────────╯
+    /// ```
+    pub const fn modern_round() -> Style<On, On, On, On, On, On> {
+        Style::new(
+            create_borders(
+                Line::full('─', '┬', '╭', '╮'),
+                Line::full('─', '┴', '╰', '╯'),
+                Line::full('─', '┼', '├', '┤'),
+                Some('│'),
+                Some('│'),
+                Some('│'),
+            ),
+            [],
+            [],
+        )
+    }
+
     /// This style looks like a [`Style::sharp`] but with rounded corners.
     ///
     /// Beware: It uses UTF-8 characters.


Test patch:
diff --git a/tabled/tests/settings/style_test.rs b/tabled/tests/settings/style_test.rs
index 8841924..6b59fea 100644
--- a/tabled/tests/settings/style_test.rs
+++ b/tabled/tests/settings/style_test.rs
@@ -81,6 +81,20 @@ test_table!(
     "╰───┴──────────┴──────────┴──────────╯"
 );
 
+test_table!(
+    modern_round_style,
+    Matrix::new(3, 3).with(Style::modern_round()),
+    "╭───┬──────────┬──────────┬──────────╮"
+    "│ N │ column 0 │ column 1 │ column 2 │"
+    "├───┼──────────┼──────────┼──────────┤"
+    "│ 0 │   0-0    │   0-1    │   0-2    │"
+    "├───┼──────────┼──────────┼──────────┤"
+    "│ 1 │   1-0    │   1-1    │   1-2    │"
+    "├───┼──────────┼──────────┼──────────┤"
+    "│ 2 │   2-0    │   2-1    │   2-2    │"
+    "╰───┴──────────┴──────────┴──────────╯"
+);
+
 test_table!(
     sharp_style,
     Matrix::new(3, 3).with(Style::sharp()),