Nightly clippy fixes

There are a few additional warnings because of
https://github.com/rust-lang/rust-clippy/issues/12377, which is a
nightly-only bug that will hopefully be fixed.
This commit is contained in:
Ilya Grigoriev 2024-03-01 21:18:03 -08:00
parent 2f7b15b7b1
commit 96bf190234
10 changed files with 1 additions and 15 deletions

View file

@ -67,7 +67,6 @@ use jj_lib::workspace::{
};
use jj_lib::{dag_walk, file_util, git, op_heads_store, op_walk, revset};
use once_cell::unsync::OnceCell;
use toml_edit;
use tracing::instrument;
use tracing_chrome::ChromeLayerBuilder;
use tracing_subscriber::prelude::*;

View file

@ -558,7 +558,6 @@ mod tests {
use jj_lib::conflicts::extract_as_single_hunk;
use jj_lib::merge::MergedTreeValue;
use jj_lib::repo::Repo;
use pollster::FutureExt;
use testutils::TestRepo;
use super::*;

View file

@ -18,9 +18,7 @@ use std::any::Any;
use std::collections::BTreeMap;
use std::fmt::Debug;
use std::io::Read;
use std::result::Result;
use std::time::SystemTime;
use std::vec::Vec;
use async_trait::async_trait;
use thiserror::Error;

View file

@ -149,8 +149,6 @@ where
mod tests {
use std::collections::{BTreeMap, HashMap};
use blake2::Blake2b512;
use super::*;
#[test]

View file

@ -1090,7 +1090,6 @@ fn has_diff_from_parent(
#[cfg(test)]
mod tests {
use super::*;
use crate::backend::{ChangeId, CommitId};
use crate::default_index::DefaultMutableIndex;
/// Generator of unique 16-byte ChangeId excluding root id

View file

@ -1295,7 +1295,6 @@ mod tests {
use test_case::test_case;
use super::*;
use crate::backend::{FileId, MillisSinceEpoch};
use crate::content_hash::blake2b_hash;
#[test_case(false; "legacy tree format")]

View file

@ -445,7 +445,6 @@ fn unwrap_as_short_key<const N: usize>(key_bytes: &[u8]) -> &[u8; N] {
#[cfg(test)]
mod tests {
use super::*;
use crate::backend::ChangeId;
#[derive(Clone, Copy, Eq, PartialEq)]
struct Position(usize);

View file

@ -496,7 +496,6 @@ mod tests {
use pollster::FutureExt;
use super::*;
use crate::backend::MillisSinceEpoch;
/// Test that parents get written correctly
#[test]

View file

@ -685,10 +685,6 @@ mod tests {
use maplit::{btreemap, hashmap, hashset};
use super::*;
use crate::backend::{CommitId, MillisSinceEpoch, Timestamp};
use crate::content_hash::blake2b_hash;
use crate::object_id::ObjectId;
use crate::op_store::{OperationMetadata, RefTarget, WorkspaceId};
fn create_view() -> View {
let new_remote_ref = |target: &RefTarget| RemoteRef {

View file

@ -269,7 +269,7 @@ impl SigningBackend for SshBackend {
#[cfg(test)]
mod tests {
use std::fs::File;
use std::io::{Read, Write};
use std::io::Read;
use super::*;