Skip to content

Commit

Permalink
Nightly clippy fixes
Browse files Browse the repository at this point in the history
There are a few additional warnings because of
rust-lang/rust-clippy#12377, which is a
nightly-only bug that will hopefully be fixed.
  • Loading branch information
ilyagr committed Mar 2, 2024
1 parent b926fd8 commit 2a20768
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 15 deletions.
1 change: 0 additions & 1 deletion cli/src/cli_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ use jj_lib::workspace::{
use jj_lib::{dag_walk, file_util, git, op_walk, revset};
use once_cell::unsync::OnceCell;
use thiserror::Error;
use toml_edit;
use tracing::instrument;
use tracing_chrome::ChromeLayerBuilder;
use tracing_subscriber::prelude::*;
Expand Down
1 change: 0 additions & 1 deletion cli/src/merge_tools/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
2 changes: 0 additions & 2 deletions lib/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions lib/src/content_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ where
mod tests {
use std::collections::{BTreeMap, HashMap};

use blake2::Blake2b512;

use super::*;

#[test]
Expand Down
1 change: 0 additions & 1 deletion lib/src/default_index/revset_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion lib/src/git_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
1 change: 0 additions & 1 deletion lib/src/id_prefix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion lib/src/local_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ mod tests {
use pollster::FutureExt;

use super::*;
use crate::backend::MillisSinceEpoch;

/// Test that parents get written correctly
#[test]
Expand Down
4 changes: 0 additions & 4 deletions lib/src/simple_op_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ssh_signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down

0 comments on commit 2a20768

Please sign in to comment.