remove unused

This commit is contained in:
Corwin 2023-07-02 13:08:44 +01:00
parent 9388098318
commit 66a212f29a
No known key found for this signature in database
2 changed files with 1 additions and 13 deletions

View file

@ -3,10 +3,7 @@
use agb::{ use agb::{
display::{ display::{
object::{ object::{ChangeColour, ObjectTextRender, PaletteVram, Size, TextAlignment},
font::{ChangeColour, ObjectTextRender, TextAlignment},
PaletteVram, Size,
},
palette16::Palette16, palette16::Palette16,
Font, HEIGHT, WIDTH, Font, HEIGHT, WIDTH,
}, },

View file

@ -101,7 +101,6 @@ pub(crate) struct Line {
width: i32, width: i32,
number_of_text_elements: usize, number_of_text_elements: usize,
number_of_spaces: usize, number_of_spaces: usize,
number_of_words: usize,
number_of_letter_groups: usize, number_of_letter_groups: usize,
} }
@ -118,11 +117,6 @@ impl Line {
pub(crate) fn number_of_spaces(&self) -> usize { pub(crate) fn number_of_spaces(&self) -> usize {
self.number_of_spaces self.number_of_spaces
} }
#[inline(always)]
pub(crate) fn number_of_words(&self) -> usize {
self.number_of_words
}
#[inline(always)] #[inline(always)]
pub(crate) fn number_of_letter_groups(&self) -> usize { pub(crate) fn number_of_letter_groups(&self) -> usize {
self.number_of_letter_groups self.number_of_letter_groups
@ -144,7 +138,6 @@ impl<'pre> Iterator for Lines<'pre> {
let mut length_of_current_word_pixels = 0; let mut length_of_current_word_pixels = 0;
let mut length_of_current_word = 0; let mut length_of_current_word = 0;
let mut number_of_spaces = 0; let mut number_of_spaces = 0;
let mut number_of_words = 0;
let mut number_of_letter_groups = 0; let mut number_of_letter_groups = 0;
while let Some(next) = self.data.get(self.current_start_idx + line_idx_length) { while let Some(next) = self.data.get(self.current_start_idx + line_idx_length) {
@ -170,7 +163,6 @@ impl<'pre> Iterator for Lines<'pre> {
current_line_width_pixels += length_of_current_word_pixels current_line_width_pixels += length_of_current_word_pixels
+ spaces_after_last_word_count as i32 * self.minimum_space_width; + spaces_after_last_word_count as i32 * self.minimum_space_width;
number_of_spaces += spaces_after_last_word_count; number_of_spaces += spaces_after_last_word_count;
number_of_words += 1;
number_of_letter_groups += length_of_current_word; number_of_letter_groups += length_of_current_word;
// reset parser // reset parser
@ -201,7 +193,6 @@ impl<'pre> Iterator for Lines<'pre> {
width: current_line_width_pixels, width: current_line_width_pixels,
number_of_text_elements: line_idx_length, number_of_text_elements: line_idx_length,
number_of_spaces, number_of_spaces,
number_of_words,
number_of_letter_groups, number_of_letter_groups,
}) })
} }