From acf4661c1eaade2b0f656d50682cfc897f68bb94 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Mon, 19 Feb 2024 11:27:34 +0100 Subject: [PATCH] fix nighty and raise msrv --- .clippy.toml | 4 ++-- .github/workflows/ci.yml | 10 +++++----- Cargo.toml | 2 +- Makefile | 5 +++++ README.md | 2 +- asyncgit/src/revlog.rs | 4 +++- asyncgit/src/sync/blame.rs | 7 ++----- asyncgit/src/sync/commit_files.rs | 5 +---- asyncgit/src/sync/commit_filter.rs | 15 +++++---------- asyncgit/src/sync/commits_info.rs | 11 ++++++++--- asyncgit/src/sync/remotes/mod.rs | 6 +++--- asyncgit/src/sync/staging/mod.rs | 4 +--- filetreelist/src/filetree.rs | 5 ++--- filetreelist/src/filetreeitems.rs | 3 +-- filetreelist/src/item.rs | 5 +---- filetreelist/src/tree_iter.rs | 7 +------ src/components/blame_file.rs | 1 - src/components/branchlist.rs | 15 ++++++--------- src/components/commit_details/details.rs | 1 - src/components/commit_details/mod.rs | 2 +- src/components/commitlist.rs | 19 ++++++------------- src/components/diff.rs | 5 +---- src/components/help.rs | 2 +- src/components/mod.rs | 1 - src/components/msg.rs | 2 +- src/components/revision_files.rs | 5 ++--- src/components/status_tree.rs | 3 +-- src/components/submodules.rs | 6 ++---- src/components/syntax_text.rs | 5 ++--- src/components/taglist.rs | 1 - src/components/textinput.rs | 1 - src/components/utils/filetree.rs | 1 - src/components/utils/logitems.rs | 8 +++----- src/keys/key_config.rs | 1 - src/tabs/status.rs | 1 - src/ui/scrollbar.rs | 1 - src/ui/scrolllist.rs | 1 - src/ui/style.rs | 1 - 38 files changed, 68 insertions(+), 110 deletions(-) diff --git a/.clippy.toml b/.clippy.toml index b1e156da..7c7c792b 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,2 +1,2 @@ -msrv = "1.65.0" -cognitive-complexity-threshold = 18 \ No newline at end of file +msrv = "1.70.0" +cognitive-complexity-threshold = 18 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index daa502d4..432c9bc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -220,11 +220,11 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@nightly - - name: cargo-udeps - run: | - # cargo install --locked cargo-udeps - cargo install --git https://github.com/est31/cargo-udeps --locked - cargo +nightly udeps --all-targets + - name: build cargo-udeps + run: cargo install --git https://github.com/est31/cargo-udeps --locked + + - name: run cargo-udeps + run: cargo +nightly udeps --all-targets log-test: name: Changelog Test diff --git a/Cargo.toml b/Cargo.toml index 0ca31bd0..a99af6f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.24.3" authors = ["extrawurst "] description = "blazing fast terminal-ui for git" edition = "2021" -rust-version = "1.65" +rust-version = "1.70" exclude = [".github/*", ".vscode/*", "assets/*"] homepage = "https://github.com/extrawurst/gitui" repository = "https://github.com/extrawurst/gitui" diff --git a/Makefile b/Makefile index 9b4782f3..aa8b23cb 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,11 @@ clippy-nightly: check: fmt clippy test deny +check-nightly: + cargo +nightly c + cargo +nightly clippy --workspace --all-features + cargo +nightly t + deny: cargo deny check diff --git a/README.md b/README.md index cc0b7503..a29bd6a3 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ All contain a single binary file ### Requirements -- Minimum supported `rust`/`cargo` version: `1.65` +- Minimum supported `rust`/`cargo` version: `1.70` - See [Install Rust](https://www.rust-lang.org/tools/install) - To build openssl dependency (see https://docs.rs/openssl/latest/openssl/) diff --git a/asyncgit/src/revlog.rs b/asyncgit/src/revlog.rs index 974dcaf3..4501c476 100644 --- a/asyncgit/src/revlog.rs +++ b/asyncgit/src/revlog.rs @@ -201,7 +201,9 @@ impl AsyncLog { ) -> Result<()> { let start_time = Instant::now(); - let mut entries = Vec::with_capacity(LIMIT_COUNT); + let mut entries = vec![CommitId::default(); LIMIT_COUNT]; + entries.resize(0, CommitId::default()); + let r = repo(repo_path)?; let mut walker = LogWalker::new(&r, LIMIT_COUNT)?.filter(filter); diff --git a/asyncgit/src/sync/blame.rs b/asyncgit/src/sync/blame.rs index 92edc991..a068b292 100644 --- a/asyncgit/src/sync/blame.rs +++ b/asyncgit/src/sync/blame.rs @@ -69,11 +69,8 @@ pub fn blame_file( utils::get_head_repo(&repo)? }; - let spec = format!( - "{}:{}", - commit_id.to_string(), - fixup_windows_path(file_path) - ); + let spec = + format!("{}:{}", commit_id, fixup_windows_path(file_path)); let object = repo.revparse_single(&spec)?; let blob = repo.find_blob(object.id())?; diff --git a/asyncgit/src/sync/commit_files.rs b/asyncgit/src/sync/commit_files.rs index d5927cc9..c03d7c13 100644 --- a/asyncgit/src/sync/commit_files.rs +++ b/asyncgit/src/sync/commit_files.rs @@ -162,10 +162,7 @@ pub(crate) fn get_commit_diff<'a>( Some(&mut opts), )?; - if stashes - .map(|stashes| stashes.contains(&id)) - .unwrap_or_default() - { + if stashes.is_some_and(|stashes| stashes.contains(&id)) { if let Ok(untracked_commit) = commit.parent_id(2) { let untracked_diff = get_commit_diff( repo, diff --git a/asyncgit/src/sync/commit_filter.rs b/asyncgit/src/sync/commit_filter.rs index 25095964..cf5a03bf 100644 --- a/asyncgit/src/sync/commit_filter.rs +++ b/asyncgit/src/sync/commit_filter.rs @@ -115,8 +115,7 @@ impl LogFilterSearch { .new_file() .path() .and_then(|file| file.as_os_str().to_str()) - .map(|file| self.match_text(file)) - .unwrap_or_default() + .is_some_and(|file| self.match_text(file)) { return true; } @@ -125,8 +124,7 @@ impl LogFilterSearch { .old_file() .path() .and_then(|file| file.as_os_str().to_str()) - .map(|file| self.match_text(file)) - .unwrap_or_default() + .is_some_and(|file| self.match_text(file)) }) } @@ -194,8 +192,7 @@ pub fn filter_commit_by_search( .ok() }) .flatten() - .map(|diff| filter.match_diff(&diff)) - .unwrap_or_default(); + .is_some_and(|diff| filter.match_diff(&diff)); let authors_match = filter .options @@ -205,13 +202,11 @@ pub fn filter_commit_by_search( let name_match = commit .author() .name() - .map(|name| filter.match_text(name)) - .unwrap_or_default(); + .is_some_and(|name| filter.match_text(name)); let mail_match = commit .author() .email() - .map(|name| filter.match_text(name)) - .unwrap_or_default(); + .is_some_and(|name| filter.match_text(name)); name_match || mail_match }) diff --git a/asyncgit/src/sync/commits_info.rs b/asyncgit/src/sync/commits_info.rs index 1f049e90..af8bac0f 100644 --- a/asyncgit/src/sync/commits_info.rs +++ b/asyncgit/src/sync/commits_info.rs @@ -1,3 +1,5 @@ +use std::fmt::Display; + use super::RepoPath; use crate::{error::Result, sync::repository::repo}; use git2::{Commit, Error, Oid}; @@ -46,9 +48,12 @@ impl CommitId { } } -impl ToString for CommitId { - fn to_string(&self) -> String { - self.0.to_string() +impl Display for CommitId { + fn fmt( + &self, + f: &mut std::fmt::Formatter<'_>, + ) -> std::fmt::Result { + write!(f, "{}", self.0) } } diff --git a/asyncgit/src/sync/remotes/mod.rs b/asyncgit/src/sync/remotes/mod.rs index d17df4c6..83887beb 100644 --- a/asyncgit/src/sync/remotes/mod.rs +++ b/asyncgit/src/sync/remotes/mod.rs @@ -60,9 +60,9 @@ pub(crate) fn get_default_remote_in_repo( let remotes = repo.remotes()?; // if `origin` exists return that - let found_origin = remotes.iter().any(|r| { - r.map(|r| r == DEFAULT_REMOTE_NAME).unwrap_or_default() - }); + let found_origin = remotes + .iter() + .any(|r| r.is_some_and(|r| r == DEFAULT_REMOTE_NAME)); if found_origin { return Ok(DEFAULT_REMOTE_NAME.into()); } diff --git a/asyncgit/src/sync/staging/mod.rs b/asyncgit/src/sync/staging/mod.rs index 1621c9d4..9b404e7f 100644 --- a/asyncgit/src/sync/staging/mod.rs +++ b/asyncgit/src/sync/staging/mod.rs @@ -9,9 +9,7 @@ use super::{ }; use crate::error::Result; use git2::{DiffLine, DiffLineType, Repository}; -use std::{ - collections::HashSet, convert::TryFrom, fs::File, io::Read, -}; +use std::{collections::HashSet, fs::File, io::Read}; const NEWLINE: char = '\n'; diff --git a/filetreelist/src/filetree.rs b/filetreelist/src/filetree.rs index 7dd864ca..37d61345 100644 --- a/filetreelist/src/filetree.rs +++ b/filetreelist/src/filetree.rs @@ -136,7 +136,7 @@ impl FileTree { }; let changed_index = - new_index.map(|i| i != selection).unwrap_or_default(); + new_index.is_some_and(|i| i != selection); if changed_index { self.selection = new_index; @@ -335,8 +335,7 @@ impl FileTree { self.items .tree_items .get(index) - .map(|item| item.info().is_visible()) - .unwrap_or_default() + .is_some_and(|item| item.info().is_visible()) } } diff --git a/filetreelist/src/filetreeitems.rs b/filetreelist/src/filetreeitems.rs index 6579988d..dfd94954 100644 --- a/filetreelist/src/filetreeitems.rs +++ b/filetreelist/src/filetreeitems.rs @@ -346,8 +346,7 @@ impl FileTreeItems { if items .get(i + 1) - .map(|item| item.kind().is_path()) - .unwrap_or_default() + .is_some_and(|item| item.kind().is_path()) { let next_item = items.remove(i + 1); let item_mut = &mut items[i]; diff --git a/filetreelist/src/item.rs b/filetreelist/src/item.rs index 7f676885..f664031b 100644 --- a/filetreelist/src/item.rs +++ b/filetreelist/src/item.rs @@ -1,8 +1,5 @@ use crate::error::Result; -use std::{ - convert::TryFrom, - path::{Path, PathBuf}, -}; +use std::path::{Path, PathBuf}; /// holds the information shared among all `FileTreeItem` in a `FileTree` #[derive(Debug, Clone)] diff --git a/filetreelist/src/tree_iter.rs b/filetreelist/src/tree_iter.rs index 8f6afe2c..13315e93 100644 --- a/filetreelist/src/tree_iter.rs +++ b/filetreelist/src/tree_iter.rs @@ -22,12 +22,7 @@ impl<'a> Iterator for TreeIterator<'a> { fn next(&mut self) -> Option { self.item_iter.next().map(|(index, item)| { - ( - item, - self.selection - .map(|i| i == index) - .unwrap_or_default(), - ) + (item, self.selection.is_some_and(|i| i == index)) }) } } diff --git a/src/components/blame_file.rs b/src/components/blame_file.rs index 2a86aba5..85820bc8 100644 --- a/src/components/blame_file.rs +++ b/src/components/blame_file.rs @@ -26,7 +26,6 @@ use ratatui::{ widgets::{Block, Borders, Cell, Clear, Row, Table, TableState}, Frame, }; -use std::convert::TryInto; static NO_COMMIT_ID: &str = "0000000"; static NO_AUTHOR: &str = ""; diff --git a/src/components/branchlist.rs b/src/components/branchlist.rs index d3cc147a..81ad9b98 100644 --- a/src/components/branchlist.rs +++ b/src/components/branchlist.rs @@ -36,7 +36,7 @@ use ratatui::{ widgets::{Block, BorderType, Borders, Clear, Paragraph, Tabs}, Frame, }; -use std::{cell::Cell, convert::TryInto}; +use std::cell::Cell; use ui::style::SharedTheme; use unicode_truncate::UnicodeTruncateStr; @@ -505,12 +505,10 @@ impl BranchListComponent { .iter() .enumerate() .filter(|(index, b)| { - b.local_details() - .map(|details| { - details.is_head - && *index == self.selection as usize - }) - .unwrap_or_default() + b.local_details().is_some_and(|details| { + details.is_head + && *index == self.selection as usize + }) }) .count() > 0 } @@ -623,8 +621,7 @@ impl BranchListComponent { let is_head = displaybranch .local_details() - .map(|details| details.is_head) - .unwrap_or_default(); + .is_some_and(|details| details.is_head); let is_head_str = if is_head { HEAD_SYMBOL } else { EMPTY_SYMBOL }; let upstream_tracking_str = match displaybranch.details { diff --git a/src/components/commit_details/details.rs b/src/components/commit_details/details.rs index e1bce3fd..cd24e1df 100644 --- a/src/components/commit_details/details.rs +++ b/src/components/commit_details/details.rs @@ -23,7 +23,6 @@ use ratatui::{ text::{Line, Span, Text}, Frame, }; -use std::clone::Clone; use std::{borrow::Cow, cell::Cell}; use sync::CommitTags; diff --git a/src/components/commit_details/mod.rs b/src/components/commit_details/mod.rs index e9cfd6b9..b8a42bcc 100644 --- a/src/components/commit_details/mod.rs +++ b/src/components/commit_details/mod.rs @@ -135,7 +135,7 @@ impl CommitDetailsComponent { } fn is_compare(&self) -> bool { - self.commit.map(|p| p.other.is_some()).unwrap_or_default() + self.commit.is_some_and(|p| p.other.is_some()) } } diff --git a/src/components/commitlist.rs b/src/components/commitlist.rs index 9f2956b7..64e41e89 100644 --- a/src/components/commitlist.rs +++ b/src/components/commitlist.rs @@ -30,8 +30,8 @@ use ratatui::{ Frame, }; use std::{ - borrow::Cow, cell::Cell, cmp, collections::BTreeMap, - convert::TryFrom, rc::Rc, time::Instant, + borrow::Cow, cell::Cell, cmp, collections::BTreeMap, rc::Rc, + time::Instant, }; const ELEMENTS_PER_LINE: usize = 9; @@ -151,11 +151,7 @@ impl CommitList { marked.windows(2).all(|w| w[0].0 + 1 == w[1].0); let yank = if marked_consecutive { - format!( - "{}^..{}", - first.1.to_string(), - last.1.to_string() - ) + format!("{}^..{}", first.1, last.1) } else { marked .iter() @@ -248,8 +244,7 @@ impl CommitList { //note: set highlights to none if there is no highlight self.highlights = if highlighting .as_ref() - .map(|set| set.is_empty()) - .unwrap_or_default() + .is_some_and(|set| set.is_empty()) { None } else { @@ -718,8 +713,7 @@ impl CommitList { self.highlights .as_ref() - .map(|highlights| highlights.contains(&commit)) - .unwrap_or_default() + .is_some_and(|highlights| highlights.contains(&commit)) } fn needs_data(&self, idx: usize, idx_max: usize) -> bool { @@ -749,8 +743,7 @@ impl CommitList { let index_in_sync = self .items .index_offset_raw() - .map(|index| want_min == index) - .unwrap_or_default(); + .is_some_and(|index| want_min == index); if !index_in_sync || !self.is_list_in_sync() || force { let commits = sync::get_commits_info( diff --git a/src/components/diff.rs b/src/components/diff.rs index 557ce9d8..1c7e0622 100644 --- a/src/components/diff.rs +++ b/src/components/diff.rs @@ -146,10 +146,7 @@ impl DiffComponent { } /// fn can_scroll(&self) -> bool { - self.diff - .as_ref() - .map(|diff| diff.lines > 1) - .unwrap_or_default() + self.diff.as_ref().is_some_and(|diff| diff.lines > 1) } /// pub fn current(&self) -> (String, bool) { diff --git a/src/components/help.rs b/src/components/help.rs index 314e1a9d..451ce7d3 100644 --- a/src/components/help.rs +++ b/src/components/help.rs @@ -20,7 +20,7 @@ use ratatui::{ widgets::{Block, BorderType, Borders, Clear, Paragraph}, Frame, }; -use std::{borrow::Cow, cmp, convert::TryFrom}; +use std::{borrow::Cow, cmp}; use ui::style::SharedTheme; /// diff --git a/src/components/mod.rs b/src/components/mod.rs index 88a1a9a8..ae29777a 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -81,7 +81,6 @@ use ratatui::{ widgets::{Block, BorderType, Borders, Paragraph, Wrap}, Frame, }; -use std::convert::From; /// creates accessors for a list of components /// diff --git a/src/components/msg.rs b/src/components/msg.rs index e7876505..7e461876 100644 --- a/src/components/msg.rs +++ b/src/components/msg.rs @@ -15,8 +15,8 @@ use ratatui::{ widgets::{Block, BorderType, Borders, Clear, Paragraph, Wrap}, Frame, }; -use std::convert::TryFrom; use ui::style::SharedTheme; + pub struct MsgComponent { title: String, msg: String, diff --git a/src/components/revision_files.rs b/src/components/revision_files.rs index ef1b0297..62c3f685 100644 --- a/src/components/revision_files.rs +++ b/src/components/revision_files.rs @@ -30,7 +30,7 @@ use ratatui::{ Frame, }; use std::{borrow::Cow, fmt::Write}; -use std::{collections::BTreeSet, convert::From, path::Path}; +use std::{collections::BTreeSet, path::Path}; use unicode_truncate::UnicodeTruncateStr; use unicode_width::UnicodeWidthStr; @@ -125,8 +125,7 @@ impl RevisionFilesComponent { if self .revision .as_ref() - .map(|commit| commit.id == result.commit) - .unwrap_or_default() + .is_some_and(|commit| commit.id == result.commit) { if let Ok(last) = result.result { let filenames: Vec<&Path> = last diff --git a/src/components/status_tree.rs b/src/components/status_tree.rs index 613460db..5c8c3692 100644 --- a/src/components/status_tree.rs +++ b/src/components/status_tree.rs @@ -18,7 +18,7 @@ use anyhow::Result; use asyncgit::{hash, sync::CommitId, StatusItem, StatusItemType}; use crossterm::event::Event; use ratatui::{backend::Backend, layout::Rect, text::Span, Frame}; -use std::{borrow::Cow, cell::Cell, convert::From, path::Path}; +use std::{borrow::Cow, cell::Cell, path::Path}; //TODO: use new `filetreelist` crate @@ -554,7 +554,6 @@ impl Component for StatusTreeComponent { #[cfg(test)] mod tests { use super::*; - use asyncgit::StatusItemType; fn string_vec_to_status(items: &[&str]) -> Vec { items diff --git a/src/components/submodules.rs b/src/components/submodules.rs index f92d800a..1bff7497 100644 --- a/src/components/submodules.rs +++ b/src/components/submodules.rs @@ -26,7 +26,7 @@ use ratatui::{ widgets::{Block, Borders, Clear, Paragraph}, Frame, }; -use std::{cell::Cell, convert::TryInto}; +use std::cell::Cell; use ui::style::SharedTheme; use unicode_truncate::UnicodeTruncateStr; @@ -296,9 +296,7 @@ impl SubmodulesListComponent { } fn can_open_submodule(&self) -> bool { - self.selected_entry() - .map(|s| s.status.is_in_wd()) - .unwrap_or_default() + self.selected_entry().is_some_and(|s| s.status.is_in_wd()) } //TODO: dedup this almost identical with BranchListComponent diff --git a/src/components/syntax_text.rs b/src/components/syntax_text.rs index c1d908bb..f031fdb6 100644 --- a/src/components/syntax_text.rs +++ b/src/components/syntax_text.rs @@ -29,7 +29,7 @@ use ratatui::{ widgets::{Block, Borders, Wrap}, Frame, }; -use std::{cell::Cell, convert::From, path::Path}; +use std::{cell::Cell, path::Path}; pub struct SyntaxTextComponent { repo: RepoPathRef, @@ -105,8 +105,7 @@ impl SyntaxTextComponent { let already_loaded = self .current_file .as_ref() - .map(|(current_file, _)| current_file == &path) - .unwrap_or_default(); + .is_some_and(|(current_file, _)| current_file == &path); if !already_loaded { //TODO: fetch file content async aswell diff --git a/src/components/taglist.rs b/src/components/taglist.rs index 18e83dab..a2c96e4a 100644 --- a/src/components/taglist.rs +++ b/src/components/taglist.rs @@ -36,7 +36,6 @@ use ratatui::{ }, Frame, }; -use std::convert::TryInto; use ui::style::SharedTheme; /// diff --git a/src/components/textinput.rs b/src/components/textinput.rs index e5fe3f4f..08633bed 100644 --- a/src/components/textinput.rs +++ b/src/components/textinput.rs @@ -21,7 +21,6 @@ use ratatui::{ }; use std::cell::Cell; use std::cell::OnceCell; -use std::convert::From; use tui_textarea::{CursorMove, Input, Key, Scrolling, TextArea}; /// diff --git a/src/components/utils/filetree.rs b/src/components/utils/filetree.rs index c39b3d2d..73ecfc74 100644 --- a/src/components/utils/filetree.rs +++ b/src/components/utils/filetree.rs @@ -4,7 +4,6 @@ use anyhow::{bail, Result}; use asyncgit::StatusItem; use std::{ collections::BTreeSet, - convert::TryFrom, ffi::OsStr, ops::{Index, IndexMut}, path::Path, diff --git a/src/components/utils/logitems.rs b/src/components/utils/logitems.rs index d6f8de79..73f7fffd 100644 --- a/src/components/utils/logitems.rs +++ b/src/components/utils/logitems.rs @@ -128,11 +128,9 @@ impl ItemBatch { self.items.extend(commits.into_iter().map(|c| { let id = c.id; let mut entry = LogEntry::from(c); - if highlighted - .as_ref() - .map(|highlighted| highlighted.contains(&id)) - .unwrap_or_default() - { + if highlighted.as_ref().is_some_and(|highlighted| { + highlighted.contains(&id) + }) { entry.highlighted = true; } entry diff --git a/src/keys/key_config.rs b/src/keys/key_config.rs index 5feb5606..9ba0c791 100644 --- a/src/keys/key_config.rs +++ b/src/keys/key_config.rs @@ -119,7 +119,6 @@ impl KeyConfig { #[cfg(test)] mod tests { use super::*; - use crossterm::event::{KeyCode, KeyModifiers}; use std::fs; use std::io::Write; use tempfile::NamedTempFile; diff --git a/src/tabs/status.rs b/src/tabs/status.rs index 4be13eb3..592d4d4e 100644 --- a/src/tabs/status.rs +++ b/src/tabs/status.rs @@ -32,7 +32,6 @@ use ratatui::{ style::{Color, Style}, widgets::{Block, BorderType, Borders, Paragraph}, }; -use std::convert::Into; /// what part of the screen is focused #[derive(PartialEq)] diff --git a/src/ui/scrollbar.rs b/src/ui/scrollbar.rs index f2e710d2..6e33a0b7 100644 --- a/src/ui/scrollbar.rs +++ b/src/ui/scrollbar.rs @@ -12,7 +12,6 @@ use ratatui::{ widgets::Widget, Frame, }; -use std::convert::TryFrom; pub enum Orientation { Vertical, diff --git a/src/ui/scrolllist.rs b/src/ui/scrolllist.rs index 6fdc4ed8..bf0b8a3b 100644 --- a/src/ui/scrolllist.rs +++ b/src/ui/scrolllist.rs @@ -8,7 +8,6 @@ use ratatui::{ widgets::{Block, Borders, List, ListItem, Widget}, Frame, }; -use std::iter::Iterator; /// struct ScrollableList<'b, L, S> diff --git a/src/ui/style.rs b/src/ui/style.rs index 7310721f..0ae9caeb 100644 --- a/src/ui/style.rs +++ b/src/ui/style.rs @@ -354,7 +354,6 @@ impl Default for Theme { mod tests { use super::*; use pretty_assertions::assert_eq; - use std::io::Write; use tempfile::NamedTempFile; #[test]