Skip to content

Commit 69ffc4e

Browse files
committed
ensure_width() doc comments
1 parent e41492a commit 69ffc4e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/render/chunk.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ pub fn calc_offsets(
4848
)
4949
}
5050

51+
/// Ensures a string has a minimum number of characters in it by
52+
/// appending spaces to the beginging of the string if its characters
53+
/// are too few. This is used for formatting the spacing of line_nums.
5154
fn ensure_width(str: String, width: u32) -> String {
5255
let spaces_to_add = width as usize - str.len();
5356
let mut spaces = String::new();

0 commit comments

Comments
 (0)