other: comment out some dead code (#1456)

This commit is contained in:
Clement Tsang 2024-05-02 15:19:44 -04:00 committed by GitHub
parent 25fb319736
commit 2b819a3097
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,8 +140,8 @@ struct Layer {
} }
trait Grid: Debug { trait Grid: Debug {
fn width(&self) -> u16; // fn width(&self) -> u16;
fn height(&self) -> u16; // fn height(&self) -> u16;
fn resolution(&self) -> (f64, f64); fn resolution(&self) -> (f64, f64);
fn paint(&mut self, x: usize, y: usize, color: Color); fn paint(&mut self, x: usize, y: usize, color: Color);
fn save(&self) -> Layer; fn save(&self) -> Layer;
@ -169,13 +169,13 @@ impl BrailleGrid {
} }
impl Grid for BrailleGrid { impl Grid for BrailleGrid {
fn width(&self) -> u16 { // fn width(&self) -> u16 {
self.width // self.width
} // }
fn height(&self) -> u16 { // fn height(&self) -> u16 {
self.height // self.height
} // }
fn resolution(&self) -> (f64, f64) { fn resolution(&self) -> (f64, f64) {
( (
@ -240,13 +240,13 @@ impl CharGrid {
} }
impl Grid for CharGrid { impl Grid for CharGrid {
fn width(&self) -> u16 { // fn width(&self) -> u16 {
self.width // self.width
} // }
fn height(&self) -> u16 { // fn height(&self) -> u16 {
self.height // self.height
} // }
fn resolution(&self) -> (f64, f64) { fn resolution(&self) -> (f64, f64) {
(f64::from(self.width) - 1.0, f64::from(self.height) - 1.0) (f64::from(self.width) - 1.0, f64::from(self.height) - 1.0)
@ -321,13 +321,13 @@ impl HalfBlockGrid {
} }
impl Grid for HalfBlockGrid { impl Grid for HalfBlockGrid {
fn width(&self) -> u16 { // fn width(&self) -> u16 {
self.width // self.width
} // }
fn height(&self) -> u16 { // fn height(&self) -> u16 {
self.height // 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)