mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-10 07:04:17 +00:00
refactor: dead_code (#974)
enabled by default, only detected by nightly yet
This commit is contained in:
parent
df5dddfbc9
commit
0de5238ed3
1 changed files with 0 additions and 28 deletions
|
@ -71,10 +71,6 @@ struct Layer {
|
||||||
/// Braille patterns will have a resolution of 2x4 dots per cell. This means that a grid of 10x10
|
/// Braille patterns will have a resolution of 2x4 dots per cell. This means that a grid of 10x10
|
||||||
/// cells will have a resolution of 20x40 dots.
|
/// cells will have a resolution of 20x40 dots.
|
||||||
trait Grid: Debug {
|
trait Grid: Debug {
|
||||||
/// Get the width of the grid in number of terminal columns
|
|
||||||
fn width(&self) -> u16;
|
|
||||||
/// Get the height of the grid in number of terminal rows
|
|
||||||
fn height(&self) -> u16;
|
|
||||||
/// Get the resolution of the grid in number of dots.
|
/// Get the resolution of the grid in number of dots.
|
||||||
///
|
///
|
||||||
/// This doesn't have to be the same as the number of rows and columns of the grid. For example,
|
/// This doesn't have to be the same as the number of rows and columns of the grid. For example,
|
||||||
|
@ -131,14 +127,6 @@ impl BrailleGrid {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Grid for BrailleGrid {
|
impl Grid for BrailleGrid {
|
||||||
fn width(&self) -> u16 {
|
|
||||||
self.width
|
|
||||||
}
|
|
||||||
|
|
||||||
fn height(&self) -> u16 {
|
|
||||||
self.height
|
|
||||||
}
|
|
||||||
|
|
||||||
fn resolution(&self) -> (f64, f64) {
|
fn resolution(&self) -> (f64, f64) {
|
||||||
(f64::from(self.width) * 2.0, f64::from(self.height) * 4.0)
|
(f64::from(self.width) * 2.0, f64::from(self.height) * 4.0)
|
||||||
}
|
}
|
||||||
|
@ -202,14 +190,6 @@ impl CharGrid {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Grid for CharGrid {
|
impl Grid for CharGrid {
|
||||||
fn width(&self) -> u16 {
|
|
||||||
self.width
|
|
||||||
}
|
|
||||||
|
|
||||||
fn height(&self) -> u16 {
|
|
||||||
self.height
|
|
||||||
}
|
|
||||||
|
|
||||||
fn resolution(&self) -> (f64, f64) {
|
fn resolution(&self) -> (f64, f64) {
|
||||||
(f64::from(self.width), f64::from(self.height))
|
(f64::from(self.width), f64::from(self.height))
|
||||||
}
|
}
|
||||||
|
@ -275,14 +255,6 @@ impl HalfBlockGrid {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Grid for HalfBlockGrid {
|
impl Grid for HalfBlockGrid {
|
||||||
fn width(&self) -> u16 {
|
|
||||||
self.width
|
|
||||||
}
|
|
||||||
|
|
||||||
fn height(&self) -> u16 {
|
|
||||||
self.height
|
|
||||||
}
|
|
||||||
|
|
||||||
fn resolution(&self) -> (f64, f64) {
|
fn resolution(&self) -> (f64, f64) {
|
||||||
(f64::from(self.width), f64::from(self.height) * 2.0)
|
(f64::from(self.width), f64::from(self.height) * 2.0)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue