Repository: zhiburt/tabled
Pull request #445 (2024-11-13 18:45:50)

tabled/ Border::set_* remove the set prefix


Patch:
diff --git a/tabled/examples/show/src/main.rs b/tabled/examples/show/src/main.rs
index b5019bf..35a055a 100644
--- a/tabled/examples/show/src/main.rs
+++ b/tabled/examples/show/src/main.rs
@@ -202,11 +202,11 @@ fn print_movies(p: &mut impl Printer, movies: &[Movie]) {
         }),
         action(|t| {
             t.with(Highlight::new(Rows::single(2)).color(BorderColor::default().top(Color::FG_YELLOW)));
-            t.with(Highlight::new(Rows::single(2)).border(Border::new().set_top('━')));
+            t.with(Highlight::new(Rows::single(2)).border(Border::new().top('━')));
         }),
         action(|t| {
             t.with(Highlight::new(Rows::last()).color(BorderColor::default().top(Color::FG_YELLOW)));
-            t.with(Highlight::new(Rows::last()).border(Border::new().set_top('━')));
+            t.with(Highlight::new(Rows::last()).border(Border::new().top('━')));
         }),
         action(|t| {
             let color = Color::try_from(" ".black().on_yellow().to_string()).unwrap();
diff --git a/tabled/src/settings/style/border.rs b/tabled/src/settings/style/border.rs
index 6e60cb6..8b1ddb2 100644
--- a/tabled/src/settings/style/border.rs
+++ b/tabled/src/settings/style/border.rs
@@ -33,7 +33,7 @@ use crate::{
 /// # let data: Vec<&'static str> = Vec::new();
 /// let table = Table::new(&data)
 ///     .with(Style::ascii())
-///     .modify(Rows::single(0), Border::new().set_top('x'));
+///     .modify(Rows::single(0), Border::new().top('x'));
 /// ```
 #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
 pub struct Border<T, B, L, R> {
@@ -123,25 +123,25 @@ impl<T, B, L, R> Border<T, B, L, R> {
 
 impl<T, B, L, R> Border<T, B, L, R> {
     /// Set a top border character.
-    pub const fn set_top(mut self, c: char) -> Border<On, B, L, R> {
+    pub const fn top(mut self, c: char) -> Border<On, B, L, R> {
         self.inner.top = Some(c);
         Border::from_border(self.inner)
     }
 
     /// Set a bottom border character.
-    pub const fn set_bottom(mut self, c: char) -> Border<T, On, L, R> {
+    pub const fn bottom(mut self, c: char) -> Border<T, On, L, R> {
         self.inner.bottom = Some(c);
         Border::from_border(self.inner)
     }
 
     /// Set a left border character.
-    pub const fn set_left(mut self, c: char) -> Border<T, B, On, R> {
+    pub const fn left(mut self, c: char) -> Border<T, B, On, R> {
         self.inner.left = Some(c);
         Border::from_border(self.inner)
     }
 
     /// Set a right border character.
-    pub const fn set_right(mut self, c: char) -> Border<T, B, L, On> {
+    pub const fn right(mut self, c: char) -> Border<T, B, L, On> {
         self.inner.right = Some(c);
         Border::from_border(self.inner)
     }
@@ -182,7 +182,7 @@ impl<T, L, R> Border<T, On, L, R> {
 
 impl<B, R> Border<On, B, On, R> {
     /// Set a top left intersection character.
-    pub const fn set_corner_top_left(mut self, c: char) -> Self {
+    pub const fn corner_top_left(mut self, c: char) -> Self {
         self.inner.left_top_corner = Some(c);
         self
     }
@@ -195,7 +195,7 @@ impl<B, R> Border<On, B, On, R> {
 
 impl<B, L> Border<On, B, L, On> {
     /// Set a top right intersection character.
-    pub const fn set_corner_top_right(mut self, c: char) -> Self {
+    pub const fn corner_top_right(mut self, c: char) -> Self {
         self.inner.right_top_corner = Some(c);
         self
     }
@@ -208,7 +208,7 @@ impl<B, L> Border<On, B, L, On> {
 
 impl<T, R> Border<T, On, On, R> {
     /// Set a bottom left intersection character.
-    pub const fn set_corner_bottom_left(mut self, c: char) -> Self {
+    pub const fn corner_bottom_left(mut self, c: char) -> Self {
         self.inner.left_bottom_corner = Some(c);
         self
     }
@@ -221,7 +221,7 @@ impl<T, R> Border<T, On, On, R> {
 
 impl<T, L> Border<T, On, L, On> {
     /// Set a bottom right intersection character.
-    pub const fn set_corner_bottom_right(mut self, c: char) -> Self {
+    pub const fn corner_bottom_right(mut self, c: char) -> Self {
         self.inner.right_bottom_corner = Some(c);
         self
     }


Test patch:
diff --git a/tabled/tests/settings/highlingt_test.rs b/tabled/tests/settings/highlingt_test.rs
index 8b6a9dc..e8980c9 100644
--- a/tabled/tests/settings/highlingt_test.rs
+++ b/tabled/tests/settings/highlingt_test.rs
@@ -123,10 +123,10 @@ test_table!(
         .with(Style::modern())
         .with(Highlight::new(Frame).border(
             Border::filled('+')
-                .set_corner_top_left('*')
-                .set_corner_top_right('#')
-                .set_corner_bottom_left('@')
-                .set_corner_bottom_right('.'),
+                .corner_top_left('*')
+                .corner_top_right('#')
+                .corner_bottom_left('@')
+                .corner_bottom_right('.'),
         )),
     "*++++++++++++++++++++++++++++++++++++#"
     "+ N │ column 0 │ column 1 │ column 2 +"
@@ -145,10 +145,10 @@ test_table!(
         .with(Style::modern())
         .with(Highlight::new(Segment::all()).border(
             Border::filled('+')
-                .set_corner_top_left('*')
-                .set_corner_top_right('#')
-                .set_corner_bottom_left('@')
-                .set_corner_bottom_right('.'),
+                .corner_top_left('*')
+                .corner_top_right('#')
+                .corner_bottom_left('@')
+                .corner_bottom_right('.'),
         )),
     "*++++++++++++++++++++++++++++++++++++#"
     "+ N │ column 0 │ column 1 │ column 2 +"
@@ -165,8 +165,8 @@ test_table!(
     highlingt_single_column,
     Matrix::table(3, 0)
         .with(Style::modern())
-        .with(Highlight::new(Cell::new(0, 0)).border(Border::new().set_left('*').set_top('x')))
-        .with(Highlight::new(Rows::new(1..3)).border(Border::new().set_left('n'))),
+        .with(Highlight::new(Cell::new(0, 0)).border(Border::new().left('*').top('x')))
+        .with(Highlight::new(Rows::new(1..3)).border(Border::new().left('n'))),
     "┌xxx┐"
     "* N │"
     "├───┤"
@@ -224,10 +224,10 @@ fn highlingt_complex_figures() {
     macro_rules! test_highlight {
         ($object:expr, $expected:expr,) => {
             let border = Border::filled('+')
-                .set_corner_top_left('*')
-                .set_corner_top_right('#')
-                .set_corner_bottom_left('@')
-                .set_corner_bottom_right('.');
+                .corner_top_left('*')
+                .corner_top_right('#')
+                .corner_bottom_left('@')
+                .corner_bottom_right('.');
 
             let table = Matrix::new(3, 3)
                 .with(Style::modern())
diff --git a/tabled/tests/settings/rotate_test.rs b/tabled/tests/settings/rotate_test.rs
index 477a695..52d1e92 100644
--- a/tabled/tests/settings/rotate_test.rs
+++ b/tabled/tests/settings/rotate_test.rs
@@ -136,7 +136,7 @@ test_table!(
 test_table!(
     rotate_preserve_border_styles_test_0,
     Matrix::iter([(123, 456, 789), (234, 567, 891), (111, 222, 333)])
-        .with(Highlight::new(Rows::single(0)).border(Border::new().set_top('*')))
+        .with(Highlight::new(Rows::single(0)).border(Border::new().top('*')))
         .with(Rotate::Left),
     "+*****************+-----+"
     "| i32 | 789 | 891 | 333 |"
@@ -154,7 +154,7 @@ test_table!(
 test_table!(
     rotate_preserve_border_styles_test_1,
     Matrix::iter([(123, 456, 789), (234, 567, 891), (111, 222, 333)])
-        .with(Highlight::new(Cell::new(0, 2)).border(Border::new().set_bottom('*')))
+        .with(Highlight::new(Cell::new(0, 2)).border(Border::new().bottom('*')))
         .with(Rotate::Left),
         "+-----+-----+-----+-----+"
         "| i32 | 789 | 891 | 333 |"
diff --git a/tabled/tests/settings/style_test.rs b/tabled/tests/settings/style_test.rs
index ae3fbb7..b6c144b 100644
--- a/tabled/tests/settings/style_test.rs
+++ b/tabled/tests/settings/style_test.rs
@@ -339,7 +339,7 @@ test_table!(
     border_text_0,
     Matrix::table(2, 2)
         .with(Style::empty())
-        .with(Modify::new(Rows::first()).with(Border::new().set_bottom('-')))
+        .with(Modify::new(Rows::first()).with(Border::new().bottom('-')))
         .with(LineText::new("-Table", Rows::single(1))),
     " N  column 0  column 1 "
     "-Table-----------------"
@@ -525,7 +525,7 @@ test_table!(
 
 test_table!(
     border_test_0,
-    Matrix::table(2, 2).with(Modify::new(Rows::single(1)).with(Border::filled('*').set_top('#'))),
+    Matrix::table(2, 2).with(Modify::new(Rows::single(1)).with(Border::filled('*').top('#'))),
     "+---+----------+----------+"
     "| N | column 0 | column 1 |"
     "*###*##########*##########*"
@@ -539,7 +539,7 @@ test_table!(
     border_test_1,
     Matrix::table(2, 2)
         .with(Style::empty())
-        .with(Modify::new(Rows::single(1)).with(Border::filled('*').set_top('#'))),
+        .with(Modify::new(Rows::single(1)).with(Border::filled('*').top('#'))),
     "  N   column 0   column 1  "
     "*###*##########*##########*"
     "* 0 *   0-0    *   0-1    *"
@@ -734,7 +734,7 @@ test_table!(
     border_none_test_0,
     Matrix::table(2, 2)
         .with(Style::ascii())
-        .with(Modify::new(Rows::single(1)).with(Border::filled('*').set_top('#')))
+        .with(Modify::new(Rows::single(1)).with(Border::filled('*').top('#')))
         .with(Modify::new(Rows::single(1)).with(Border::empty())),
     "+---+----------+----------+"
     "| N | column 0 | column 1 |"
@@ -749,7 +749,7 @@ test_table!(
     border_none_test_1,
     Matrix::table(2, 2)
         .with(Style::empty())
-        .with(Modify::new(Rows::single(1)).with(Border::filled('*').set_top('#')))
+        .with(Modify::new(Rows::single(1)).with(Border::filled('*').top('#')))
         .with(Modify::new(Columns::single(1)).with(Border::empty())),
     "  N  column 0  column 1  "
     "*###          ##########*"
@@ -1620,7 +1620,7 @@ fn test_default_border_usage() {
     }
 
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_bottom(' ').set_left(' ').set_corner_bottom_left('*')),
+        Modify::new((3, 2)).with(Border::new().bottom(' ').left(' ').corner_bottom_left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string     0-1       0-2    "
@@ -1630,7 +1630,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_bottom(' ').set_right(' ').set_corner_bottom_right('*')),
+        Modify::new((3, 2)).with(Border::new().bottom(' ').right(' ').corner_bottom_right('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1640,7 +1640,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_bottom('*')),
+        Modify::new((3, 2)).with(Border::new().bottom('*')),
         static_table!(
             " N     column 0      column 1  column 2 "
             " 0  a longer string    0-1       0-2    "
@@ -1650,7 +1650,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_bottom('*').set_left(' ').set_corner_bottom_left('#')),
+        Modify::new((3, 2)).with(Border::new().bottom('*').left(' ').corner_bottom_left('#')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string     0-1       0-2    "
@@ -1660,7 +1660,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_bottom('*').set_right(' ').set_corner_bottom_right('#')),
+        Modify::new((3, 2)).with(Border::new().bottom('*').right(' ').corner_bottom_right('#')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1670,7 +1670,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_left('*')),
+        Modify::new((3, 2)).with(Border::new().left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string     0-1       0-2    "
@@ -1679,7 +1679,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_top(' ').set_left(' ').set_corner_top_left('*')),
+        Modify::new((3, 2)).with(Border::new().top(' ').left(' ').corner_top_left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string     0-1       0-2    "
@@ -1689,7 +1689,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_left('#').set_top(' ').set_corner_top_left('*')),
+        Modify::new((3, 2)).with(Border::new().left('#').top(' ').corner_top_left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string     0-1       0-2    "
@@ -1699,7 +1699,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_left('#').set_top(' ').set_bottom(' ').set_corner_bottom_left('@').set_corner_top_left('*')),
+        Modify::new((3, 2)).with(Border::new().left('#').top(' ').bottom(' ').corner_bottom_left('@').corner_top_left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string     0-1       0-2    "
@@ -1710,7 +1710,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_right('*')),
+        Modify::new((3, 2)).with(Border::new().right('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1719,7 +1719,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_top(' ').set_right(' ').set_corner_top_right('*')),
+        Modify::new((3, 2)).with(Border::new().top(' ').right(' ').corner_top_right('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1729,7 +1729,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_top(' ').set_right('#').set_corner_top_right('*')),
+        Modify::new((3, 2)).with(Border::new().top(' ').right('#').corner_top_right('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1739,7 +1739,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_top(' ').set_bottom(' ').set_right('#').set_corner_top_right('*').set_corner_bottom_right('@')),
+        Modify::new((3, 2)).with(Border::new().top(' ').bottom(' ').right('#').corner_top_right('*').corner_bottom_right('@')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1750,7 +1750,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((3, 2)).with(Border::new().set_top(' ').set_bottom(' ').set_left(' ').set_right('#').set_corner_top_right('*').set_corner_bottom_left('@')),
+        Modify::new((3, 2)).with(Border::new().top(' ').bottom(' ').left(' ').right('#').corner_top_right('*').corner_bottom_left('@')),
         static_table!(
             " N     column 0       column 1   column 2 "
             " 0  a longer string     0-1        0-2    "
@@ -1773,7 +1773,7 @@ fn test_default_border_usage() {
     }
 
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_left(' ').set_bottom(' ').set_corner_bottom_left('*')),
+        Modify::new((1, 2)).with(Border::new().left(' ').bottom(' ').corner_bottom_left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string     0-1       0-2    "
@@ -1783,7 +1783,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_right(' ').set_bottom(' ').set_corner_bottom_right('*')),
+        Modify::new((1, 2)).with(Border::new().right(' ').bottom(' ').corner_bottom_right('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1793,7 +1793,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_bottom('*')),
+        Modify::new((1, 2)).with(Border::new().bottom('*')),
         static_table!(
             " N     column 0      column 1  column 2 "
             " 0  a longer string    0-1       0-2    "
@@ -1803,7 +1803,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_left(' ').set_bottom('*').set_corner_bottom_left('#')),
+        Modify::new((1, 2)).with(Border::new().left(' ').bottom('*').corner_bottom_left('#')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string     0-1       0-2    "
@@ -1813,7 +1813,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_right(' ').set_bottom('*').set_corner_bottom_right('#')),
+        Modify::new((1, 2)).with(Border::new().right(' ').bottom('*').corner_bottom_right('#')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1823,7 +1823,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_left('*')),
+        Modify::new((1, 2)).with(Border::new().left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             " 0  a longer string *   0-1       0-2    "
@@ -1832,7 +1832,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_top(' ').set_left(' ').set_corner_top_left('*')),
+        Modify::new((1, 2)).with(Border::new().top(' ').left(' ').corner_top_left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             "                    *                    "
@@ -1842,7 +1842,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_left('#').set_top(' ').set_corner_top_left('*')),
+        Modify::new((1, 2)).with(Border::new().left('#').top(' ').corner_top_left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             "                    *                    "
@@ -1852,7 +1852,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_top(' ').set_bottom(' ').set_left('#').set_corner_bottom_left('@').set_corner_top_left('*')),
+        Modify::new((1, 2)).with(Border::new().top(' ').bottom(' ').left('#').corner_bottom_left('@').corner_top_left('*')),
         static_table!(
             " N     column 0       column 1  column 2 "
             "                    *                    "
@@ -1863,7 +1863,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_right('*')),
+        Modify::new((1, 2)).with(Border::new().right('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             " 0  a longer string    0-1    *   0-2    "
@@ -1872,7 +1872,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_top(' ').set_right(' ').set_corner_top_right('*')),
+        Modify::new((1, 2)).with(Border::new().top(' ').right(' ').corner_top_right('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             "                              *          "
@@ -1882,7 +1882,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_top(' ').set_right('#').set_corner_top_right('*')),
+        Modify::new((1, 2)).with(Border::new().top(' ').right('#').corner_top_right('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             "                              *          "
@@ -1892,7 +1892,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_top(' ').set_bottom(' ').set_right('#').set_corner_top_right('*').set_corner_bottom_right('@')),
+        Modify::new((1, 2)).with(Border::new().top(' ').bottom(' ').right('#').corner_top_right('*').corner_bottom_right('@')),
         static_table!(
             " N     column 0      column 1   column 2 "
             "                              *          "
@@ -1903,7 +1903,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((1, 2)).with(Border::new().set_top(' ').set_bottom(' ').set_left(' ').set_right('#').set_corner_top_right('*').set_corner_bottom_left('@')),
+        Modify::new((1, 2)).with(Border::new().top(' ').bottom(' ').left(' ').right('#').corner_top_right('*').corner_bottom_left('@')),
         static_table!(
             " N     column 0       column 1   column 2 "
             "                               *          "
@@ -1926,7 +1926,7 @@ fn test_default_border_usage() {
     }
 
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_left(' ').set_bottom(' ').set_corner_bottom_left('*')),
+        Modify::new((0, 3)).with(Border::new().left(' ').bottom(' ').corner_bottom_left('*')),
         static_table!(
             " N     column 0      column 1   column 2 "
             "                              *          "
@@ -1936,7 +1936,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_right(' ').set_bottom(' ').set_corner_bottom_right('*')),
+        Modify::new((0, 3)).with(Border::new().right(' ').bottom(' ').corner_bottom_right('*')),
         static_table!(
             " N     column 0      column 1  column 2  "
             "                                        *"
@@ -1946,7 +1946,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_bottom('*')),
+        Modify::new((0, 3)).with(Border::new().bottom('*')),
         static_table!(
             " N     column 0      column 1  column 2 "
             "                              **********"
@@ -1956,7 +1956,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_left(' ').set_bottom('*').set_corner_bottom_left('#')),
+        Modify::new((0, 3)).with(Border::new().left(' ').bottom('*').corner_bottom_left('#')),
         static_table!(
             " N     column 0      column 1   column 2 "
             "                              #**********"
@@ -1966,7 +1966,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_right(' ').set_bottom('*').set_corner_bottom_right('#')),
+        Modify::new((0, 3)).with(Border::new().right(' ').bottom('*').corner_bottom_right('#')),
         static_table!(
             " N     column 0      column 1  column 2  "
             "                              **********#"
@@ -1976,7 +1976,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_left('*')),
+        Modify::new((0, 3)).with(Border::new().left('*')),
         static_table!(
             " N     column 0      column 1 * column 2 "
             " 0  a longer string    0-1        0-2    "
@@ -1985,7 +1985,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_top(' ').set_left(' ').set_corner_top_left('*')),
+        Modify::new((0, 3)).with(Border::new().top(' ').left(' ').corner_top_left('*')),
         static_table!(
             "                              *          "
             " N     column 0      column 1   column 2 "
@@ -1995,7 +1995,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_top(' ').set_left('#').set_corner_top_left('*')),
+        Modify::new((0, 3)).with(Border::new().top(' ').left('#').corner_top_left('*')),
         static_table!(
             "                              *          "
             " N     column 0      column 1 # column 2 "
@@ -2005,7 +2005,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_top(' ').set_bottom(' ').set_left('#').set_corner_bottom_left('@').set_corner_top_left('*')),
+        Modify::new((0, 3)).with(Border::new().top(' ').bottom(' ').left('#').corner_bottom_left('@').corner_top_left('*')),
         static_table!(
             "                              *          "
             " N     column 0      column 1 # column 2 "
@@ -2016,7 +2016,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_right('*')),
+        Modify::new((0, 3)).with(Border::new().right('*')),
         static_table!(
             " N     column 0      column 1  column 2 *"
             " 0  a longer string    0-1       0-2     "
@@ -2025,7 +2025,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_top(' ').set_right(' ').set_corner_top_right('*')),
+        Modify::new((0, 3)).with(Border::new().top(' ').right(' ').corner_top_right('*')),
         static_table!(
             "                                        *"
             " N     column 0      column 1  column 2  "
@@ -2035,7 +2035,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_top(' ').set_right('#').set_corner_top_right('*')),
+        Modify::new((0, 3)).with(Border::new().top(' ').right('#').corner_top_right('*')),
         static_table!(
             "                                        *"
             " N     column 0      column 1  column 2 #"
@@ -2045,7 +2045,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_top(' ').set_bottom(' ').set_right('#').set_corner_top_right('*').set_corner_bottom_right('@')),
+        Modify::new((0, 3)).with(Border::new().top(' ').bottom(' ').right('#').corner_top_right('*').corner_bottom_right('@')),
         static_table!(
             "                                        *"
             " N     column 0      column 1  column 2 #"
@@ -2056,7 +2056,7 @@ fn test_default_border_usage() {
         )
     }
     test_border! {
-        Modify::new((0, 3)).with(Border::new().set_top(' ').set_bottom(' ').set_left(' ').set_right('#').set_corner_top_right('*').set_corner_bottom_left('@')),
+        Modify::new((0, 3)).with(Border::new().top(' ').bottom(' ').left(' ').right('#').corner_top_right('*').corner_bottom_left('@')),
         static_table!(
             "                                         *"
             " N     column 0      column 1   column 2 #"
@@ -2090,7 +2090,7 @@ fn border_colored_test() {
                     BorderColor::filled(Color::try_from('*'.blue().to_string()).unwrap())
                         .top(Color::try_from('#'.truecolor(12, 220, 100).to_string()).unwrap()),
                 )
-                .with(Border::filled('*').set_top('#')),
+                .with(Border::filled('*').top('#')),
         )
         .to_string();
 
@@ -2128,7 +2128,7 @@ fn border_colored_test() {
                     BorderColor::filled(Color::try_from('*'.blue().to_string()).unwrap())
                         .top(Color::try_from('#'.truecolor(12, 220, 100).to_string()).unwrap()),
                 )
-                .with(Border::filled('*').set_top('#')),
+                .with(Border::filled('*').top('#')),
         )
         .to_string();