Merge 66a5929082 into sapling-pr-archive-bolinfest

This commit is contained in:
Michael Bolin
2025-08-06 00:07:56 -07:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,3 @@
use shlex;
#[derive(Debug, PartialEq, Eq)]
pub struct ZshShell {
shell_path: String,

View File

@@ -1,5 +1,4 @@
use unicode_width::UnicodeWidthChar;
use unicode_width::UnicodeWidthStr;
/// A single visual row produced by RowBuilder.
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -10,7 +9,9 @@ pub struct Row {
}
impl Row {
#[cfg(test)]
pub fn width(&self) -> usize {
use unicode_width::UnicodeWidthStr;
self.text.width()
}
}
@@ -39,6 +40,7 @@ impl RowBuilder {
self.target_width
}
#[cfg(test)]
pub fn set_width(&mut self, width: usize) {
self.target_width = width.max(1);
// Rewrap everything we have (simple approach for Step 1).
@@ -87,6 +89,7 @@ impl RowBuilder {
}
/// Return a snapshot of produced rows (non-draining).
#[cfg(test)]
pub fn rows(&self) -> &[Row] {
&self.rows
}