Repository: zhiburt/tabled
Pull request #433 (2024-10-26 18:33:47)

Fix test fail


Patch:
diff --git a/tabled/Cargo.toml b/tabled/Cargo.toml
index e655cbe..0fe1245 100644
--- a/tabled/Cargo.toml
+++ b/tabled/Cargo.toml
@@ -311,8 +311,8 @@ ansi = ["papergrid/ansi", "ansi-str", "ansitok", "std"]
 macros = ["std"]
 
 [dependencies]
-papergrid = { version = "0.12", default-features = false }
-tabled_derive = { version = "0.8", optional = true }
+papergrid = { path = "../papergrid", default-features = false }
+tabled_derive = { path = "../tabled_derive", optional = true }
 ansi-str = { version = "0.8", optional = true }
 ansitok = { version = "0.2", optional = true }
 
diff --git a/tabled/src/tables/compact.rs b/tabled/src/tables/compact.rs
index a28a654..645e639 100644
--- a/tabled/src/tables/compact.rs
+++ b/tabled/src/tables/compact.rs
@@ -221,7 +221,7 @@ impl<I, D> CompactTable<I, D> {
         D: Dimension,
         W: std::io::Write,
     {
-        let writer = super::util::utf8_writer::UTF8Writer::new(writer);
+        let writer = crate::util::utf8_writer::UTF8Writer::new(writer);
         self.fmt(writer)
             .map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))
     }
diff --git a/tabled/src/tables/iter.rs b/tabled/src/tables/iter.rs
index 303cc86..b25f50c 100644
--- a/tabled/src/tables/iter.rs
+++ b/tabled/src/tables/iter.rs
@@ -42,7 +42,7 @@ use crate::{
     settings::{Style, TableOption},
 };
 
-use super::util::utf8_writer::UTF8Writer;
+use crate::util::utf8_writer::UTF8Writer;
 
 /// A table which consumes an [`IntoRecords`] iterator.
 ///
diff --git a/tabled/src/tables/mod.rs b/tabled/src/tables/mod.rs
index 1b9e9e6..55c7bce 100644
--- a/tabled/src/tables/mod.rs
+++ b/tabled/src/tables/mod.rs
@@ -18,7 +18,6 @@
 //! A table with a greater control of a layout.
 
 mod compact;
-mod util;
 
 #[cfg(feature = "std")]
 mod extended;
diff --git a/tabled/src/tables/util/mod.rs b/tabled/src/tables/util/mod.rs
deleted file mode 100644
index ea5453b..0000000
--- a/tabled/src/tables/util/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-#[cfg(feature = "std")]
-pub(crate) mod utf8_writer;
diff --git a/tabled/src/util/mod.rs b/tabled/src/util/mod.rs
index 47ed4f3..c8b6af5 100644
--- a/tabled/src/util/mod.rs
+++ b/tabled/src/util/mod.rs
@@ -1,2 +1,5 @@
 #[cfg(feature = "std")]
 pub(crate) mod string;
+
+#[cfg(feature = "std")]
+pub(crate) mod utf8_writer;


Test patch:
diff --git a/tabled/src/tables/util/utf8_writer.rs b/tabled/src/util/utf8_writer.rs
similarity index 100%
rename from tabled/src/tables/util/utf8_writer.rs
rename to tabled/src/util/utf8_writer.rs
diff --git a/tabled/tests/core/table_test.rs b/tabled/tests/core/table_test.rs
index c75b0f3..c326426 100644
--- a/tabled/tests/core/table_test.rs
+++ b/tabled/tests/core/table_test.rs
@@ -740,15 +740,15 @@ mod derived {
                 },
             ]
         }),
-        "+------------------------------------+-----------------+-------------------------------+--------+"
-        "| name                               | author          | text                          | rating |"
-        "+------------------------------------+-----------------+-------------------------------+--------+"
-        "| Rebase vs Merge commit in depth 👋 | Rose Kuphal DVM | A multiline                   | 43     |"
-        "|                                    |                 |  text with 🤯 😳 🥵 🥶        |        |"
-        "|                                    |                 |  a bunch of emojies ☄\u{fe0f} 💥 🔥 🌪 |        |"
-        "+------------------------------------+-----------------+-------------------------------+--------+"
-        "| Keep it simple                     | Unknown         | 🍳                            | 100    |"
-        "+------------------------------------+-----------------+-------------------------------+--------+"
+        "+------------------------------------+-----------------+--------------------------------+--------+"
+        "| name                               | author          | text                           | rating |"
+        "+------------------------------------+-----------------+--------------------------------+--------+"
+        "| Rebase vs Merge commit in depth 👋 | Rose Kuphal DVM | A multiline                    | 43     |"
+        "|                                    |                 |  text with 🤯 😳 🥵 🥶         |        |"
+        "|                                    |                 |  a bunch of emojies ☄️ 💥 🔥 🌪 |        |"
+        "+------------------------------------+-----------------+--------------------------------+--------+"
+        "| Keep it simple                     | Unknown         | 🍳                             | 100    |"
+        "+------------------------------------+-----------------+--------------------------------+--------+"
     );
 }