From 7697f7bdce64356be5d1a6fd73e371d33ad81aa6 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Tue, 5 Oct 2021 12:58:48 -0500 Subject: [PATCH] fix doc-test --- crates/nu-command/src/viewers/grid.rs | 4 ++-- crates/nu-command/src/viewers/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/nu-command/src/viewers/grid.rs b/crates/nu-command/src/viewers/grid.rs index 56834e32b6..8856bdb8af 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 9600f57b5e..a2f76b56ca 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;