summaryrefslogtreecommitdiffstats
path: root/src/row.rs
diff options
context:
space:
mode:
authorPierre-Henri Symoneaux <pierre.henri.symoneaux@gmail.com>2019-08-26 23:48:51 +0200
committerPierre-Henri Symoneaux <pierre.henri.symoneaux@gmail.com>2019-08-26 23:48:51 +0200
commitcf7dca33e2e2131c20e4bbc34ad222c5e6edc29a (patch)
tree6095c3ef10e7104d32b9c93e35d173cc243ad95f /src/row.rs
parent6bb234c979f8153f8ee8eede5cbb9a1ae2658f23 (diff)
Privatize deprecated functions functions for #87HEADmaster
Diffstat (limited to 'src/row.rs')
-rw-r--r--src/row.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/row.rs b/src/row.rs
index d3a9d86..ae14429 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -31,8 +31,8 @@ impl Row {
/// Count the number of column required in the table grid.
/// It takes into account horizontal spanning of cells. For
/// example, a cell with an hspan of 3 will add 3 column to the grid
- #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
- pub fn column_count(&self) -> usize {
+ // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
+ pub (crate) fn column_count(&self) -> usize {
self.cells.iter().map(|c| c.get_hspan()).sum()
}
@@ -48,8 +48,8 @@ impl Row {
}
/// Get the height of this row
- #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
- pub fn get_height(&self) -> usize {
+ // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
+ fn get_height(&self) -> usize {
let mut height = 1; // Minimum height must be 1 to print empty rows
for cell in &self.cells {
let h = cell.get_height();
@@ -62,8 +62,8 @@ impl Row {
/// Get the minimum width required by the cell in the column `column`.
/// Return 0 if the cell does not exist in this row
- #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
- pub fn get_column_width(&self, column: usize, format: &TableFormat) -> usize {
+ // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
+ pub (crate) fn get_column_width(&self, column: usize, format: &TableFormat) -> usize {
let mut i = 0;
for c in &self.cells {
if i + c.get_hspan() > column {
@@ -186,8 +186,8 @@ impl Row {
/// Print the row to `out`, with `separator` as column separator, and `col_width`
/// specifying the width of each columns. Returns the number of printed lines
- #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
- pub fn print<T: Write + ?Sized>(&self,
+ // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
+ pub (crate) fn print<T: Write + ?Sized>(&self,
out: &mut T,
format: &TableFormat,
col_width: &[usize])
@@ -197,8 +197,8 @@ impl Row {
/// Print the row to terminal `out`, with `separator` as column separator, and `col_width`
/// specifying the width of each columns. Apply style when needed. returns the number of printed lines
- #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
- pub fn print_term<T: Terminal + ?Sized>(&self,
+ // #[deprecated(since="0.8.0", note="Will become private in future release. See [issue #87](https://github.com/phsym/prettytable-rs/issues/87)")]
+ pub (crate) fn print_term<T: Terminal + ?Sized>(&self,
out: &mut T,
format: &TableFormat,
col_width: &[usize])