diff --git a/crates/nu-command/src/viewers/grid.rs b/crates/nu-command/src/viewers/grid.rs index 56834e32b..8856bdb8a 100644 --- a/crates/nu-command/src/viewers/grid.rs +++ b/crates/nu-command/src/viewers/grid.rs @@ -13,7 +13,7 @@ //! needed. For example: //! //! ```rust -//! use super::grid::{Grid, GridOptions, Direction, Filling, Cell}; +//! use nu_command::grid::{Grid, GridOptions, Direction, Filling, Cell}; //! //! let mut grid = Grid::new(GridOptions { //! filling: Filling::Spaces(1), @@ -521,7 +521,7 @@ impl fmt::Display for Display<'_> { /// Pad a string with the given number of spaces. fn spaces(length: usize) -> String { - repeat(" ").take(length).collect() + " ".repeat(length) } /// Pad a string with the given alignment and number of spaces. diff --git a/crates/nu-command/src/viewers/mod.rs b/crates/nu-command/src/viewers/mod.rs index 9600f57b5..a2f76b56c 100644 --- a/crates/nu-command/src/viewers/mod.rs +++ b/crates/nu-command/src/viewers/mod.rs @@ -1,4 +1,4 @@ -mod grid; +pub mod grid; mod griddle; mod table;