fix new rust warnings

This commit is contained in:
extrawurst 2024-06-14 16:46:04 +02:00 committed by extrawurst
parent 65410e7293
commit 038c4a50d1
3 changed files with 5 additions and 6 deletions

View file

@ -2,7 +2,7 @@ use crate::{
error::Result, filetreeitems::FileTreeItems,
tree_iter::TreeIterator, TreeItemInfo,
};
use std::{collections::BTreeSet, path::Path, usize};
use std::{collections::BTreeSet, path::Path};
///
#[derive(Copy, Clone, Debug)]

View file

@ -7,7 +7,6 @@ use crate::{error::Result, treeitems_iter::TreeItemsIterator};
use std::{
collections::{BTreeSet, HashMap},
path::{Path, PathBuf},
usize,
};
///

View file

@ -27,8 +27,8 @@ impl<'a, 'b> WordWrapper<'a, 'b> {
symbols: &'b mut dyn Iterator<Item = StyledGrapheme<'a>>,
max_line_width: u16,
trim: bool,
) -> WordWrapper<'a, 'b> {
WordWrapper {
) -> Self {
Self {
symbols,
max_line_width,
current_line: vec![],
@ -152,8 +152,8 @@ impl<'a, 'b> LineTruncator<'a, 'b> {
pub fn new(
symbols: &'b mut dyn Iterator<Item = StyledGrapheme<'a>>,
max_line_width: u16,
) -> LineTruncator<'a, 'b> {
LineTruncator {
) -> Self {
Self {
symbols,
max_line_width,
horizontal_offset: 0,