mirror of
https://github.com/openai/codex.git
synced 2026-12-01 00:20:48 +00:00
tui: remove unused helpers
This commit is contained in:
@@ -90,11 +90,6 @@ impl AsciiAnimation {
|
||||
true
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn request_frame(&self) {
|
||||
self.request_frame.schedule_frame();
|
||||
}
|
||||
|
||||
fn frames(&self) -> &'static [&'static str] {
|
||||
self.variants[self.variant_idx]
|
||||
}
|
||||
|
||||
@@ -352,14 +352,6 @@ where
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Gets the current cursor position.
|
||||
///
|
||||
/// This is the position of the cursor after the last draw call.
|
||||
#[allow(dead_code)]
|
||||
pub fn get_cursor_position(&mut self) -> io::Result<Position> {
|
||||
self.backend.get_cursor_position()
|
||||
}
|
||||
|
||||
/// Sets the cursor position.
|
||||
pub fn set_cursor_position<P: Into<Position>>(&mut self, position: P) -> io::Result<()> {
|
||||
let position = position.into();
|
||||
|
||||
@@ -200,15 +200,6 @@ impl<'a> ColumnRenderable<'a> {
|
||||
pub fn push(&mut self, child: impl Into<Box<dyn Renderable + 'a>>) {
|
||||
self.children.push(RenderableItem::Owned(child.into()));
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn push_ref<R>(&mut self, child: &'a R)
|
||||
where
|
||||
R: Renderable + 'a,
|
||||
{
|
||||
self.children
|
||||
.push(RenderableItem::Borrowed(child as &'a dyn Renderable));
|
||||
}
|
||||
}
|
||||
|
||||
pub struct FlexChild<'a> {
|
||||
@@ -375,15 +366,6 @@ impl<'a> RowRenderable<'a> {
|
||||
self.children
|
||||
.push((width, RenderableItem::Owned(child.into())));
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn push_ref<R>(&mut self, width: u16, child: &'a R)
|
||||
where
|
||||
R: Renderable + 'a,
|
||||
{
|
||||
self.children
|
||||
.push((width, RenderableItem::Borrowed(child as &'a dyn Renderable)));
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InsetRenderable<'a> {
|
||||
|
||||
@@ -82,7 +82,6 @@ impl From<usize> for RtOptions<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl<'a> RtOptions<'a> {
|
||||
pub fn new(width: usize) -> Self {
|
||||
RtOptions {
|
||||
@@ -101,17 +100,6 @@ impl<'a> RtOptions<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn line_ending(self, line_ending: textwrap::LineEnding) -> Self {
|
||||
RtOptions {
|
||||
line_ending,
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn width(self, width: usize) -> Self {
|
||||
RtOptions { width, ..self }
|
||||
}
|
||||
|
||||
pub fn initial_indent(self, initial_indent: Line<'a>) -> Self {
|
||||
RtOptions {
|
||||
initial_indent,
|
||||
@@ -133,20 +121,6 @@ impl<'a> RtOptions<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn word_separator(self, word_separator: textwrap::WordSeparator) -> RtOptions<'a> {
|
||||
RtOptions {
|
||||
word_separator,
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn wrap_algorithm(self, wrap_algorithm: textwrap::WrapAlgorithm) -> RtOptions<'a> {
|
||||
RtOptions {
|
||||
wrap_algorithm,
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn word_splitter(self, word_splitter: textwrap::WordSplitter) -> RtOptions<'a> {
|
||||
RtOptions {
|
||||
word_splitter,
|
||||
|
||||
Reference in New Issue
Block a user