fix new rust warnings

This commit is contained in:
extrawurst
2024-06-14 21:40:46 +02:00
committed by extrawurst
parent 65410e7293
commit 038c4a50d1
3 changed files with 5 additions and 6 deletions
+1 -1
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)]
-1
View File
@@ -7,7 +7,6 @@ use crate::{error::Result, treeitems_iter::TreeItemsIterator};
use std::{
collections::{BTreeSet, HashMap},
path::{Path, PathBuf},
usize,
};
///
+4 -4
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,