Skip to content

Commit 02f6d67

Browse files
committed
Fix unused_trait_names lint issues
1 parent fe8ae82 commit 02f6d67

File tree

16 files changed

+20
-19
lines changed

16 files changed

+20
-19
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{env, process};
22

3-
use chrono::{TimeZone, Utc};
3+
use chrono::{TimeZone as _, Utc};
44
use rustc_version::{Channel, version_meta};
55

66
fn main() {

src/components/spin_indicator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl SpinIndicator {
2929
}
3030
#[cfg(test)]
3131
mod tests {
32-
use std::ops::{Add, Sub};
32+
use std::ops::{Add as _, Sub as _};
3333

3434
const SAFE_TEST_DURATION: Duration = Duration::from_secs(60);
3535

src/display/crossterm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![cfg(not(tarpaulin_include))]
2-
use std::io::{BufWriter, Stdout, Write, stdout};
2+
use std::io::{BufWriter, Stdout, Write as _, stdout};
33

44
use crossterm::{
55
Command,
6-
QueueableCommand,
6+
QueueableCommand as _,
77
cursor::{Hide, MoveTo, MoveToColumn, MoveToNextLine, Show},
88
event::{
99
DisableMouseCapture,

src/git/commit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use chrono::{DateTime, Local, TimeZone};
1+
use chrono::{DateTime, Local, TimeZone as _};
22

33
use crate::git::{GitError, Reference, User};
44

src/git/commit_diff_loader.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl<'options> CommitDiffLoader<'options> {
160160
mod tests {
161161
use std::{
162162
fs::{File, remove_file},
163-
io::Write,
163+
io::Write as _,
164164
os::unix::fs::symlink,
165165
};
166166

@@ -557,7 +557,8 @@ mod tests {
557557
#[test]
558558
fn load_from_hash_file_mode_executable() {
559559
with_temp_repository(|repo| {
560-
use std::os::unix::fs::PermissionsExt;
560+
use std::os::unix::fs::PermissionsExt as _;
561+
561562
let root = repo.repo_path().parent().unwrap().to_path_buf();
562563

563564
write_normal_file(&repo, "a", &["line0"]);

src/modules/show_commit/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::path::Path;
22

3-
use num_format::{Locale, ToFormattedString};
3+
use num_format::{Locale, ToFormattedString as _};
44
use unicode_segmentation::UnicodeSegmentation;
55

66
use crate::{

src/runtime/thread_statuses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl ThreadStatuses {
7777

7878
#[cfg(test)]
7979
mod tests {
80-
use std::{ops::Mul, thread};
80+
use std::{ops::Mul as _, thread};
8181

8282
use claims::{assert_err, assert_err_eq, assert_ok, assert_some_eq};
8383

src/search/interrupter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::{
2-
ops::Add,
2+
ops::Add as _,
33
time::{Duration, Instant},
44
};
55

@@ -21,7 +21,7 @@ impl Interrupter {
2121

2222
#[cfg(test)]
2323
mod test {
24-
use std::ops::Sub;
24+
use std::ops::Sub as _;
2525

2626
use super::*;
2727

src/test_helpers/assertions/assert_rendered_output/patterns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{
33
sync::LazyLock,
44
};
55

6-
use itertools::Itertools;
6+
use itertools::Itertools as _;
77
use regex::Regex;
88

99
use crate::{

src/test_helpers/builders/commit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use chrono::{Local, TimeZone};
1+
use chrono::{Local, TimeZone as _};
22

33
use crate::{
44
git::{Commit, Reference, User},

0 commit comments

Comments
 (0)