From 4fbe6aecc95152eda44cb4b185ab369e23e1393f Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Tue, 19 Mar 2024 16:42:39 -0700 Subject: [PATCH] clippy: remove some unused code beta clippy/rustc compain about There are still some warnings from (seemingly) clippy bugs. Quoting myself from Discord: > PSA: the latest beta cargo clippy (from Rust 1.78) has some problems > that affect jj: https://github.com/rust-lang/rust-clippy/issues/12467 > and https://github.com/rust-lang/rust-clippy/issues/12377. You could > disable clippy::assigning_clones and clippy::empty_docs as a workaround. > VS Code can disable them in rust-analyzer, you can also use > https://github.com/ericseppanen/cargo-cranky (you can put Cranky.toml in > the per-user gitignore). --- cli/src/template_builder.rs | 1 - lib/src/files.rs | 9 --------- 2 files changed, 10 deletions(-) diff --git a/cli/src/template_builder.rs b/cli/src/template_builder.rs index 80b24b9c3..1050ac864 100644 --- a/cli/src/template_builder.rs +++ b/cli/src/template_builder.rs @@ -1176,7 +1176,6 @@ mod tests { use super::*; use crate::formatter::{self, ColorFormatter}; use crate::generic_templater::GenericTemplateLanguage; - use crate::template_parser::TemplateAliasesMap; type TestTemplateLanguage = GenericTemplateLanguage<'static, ()>; type TestTemplatePropertyKind = >::Property; diff --git a/lib/src/files.rs b/lib/src/files.rs index 62346c65f..a30d09787 100644 --- a/lib/src/files.rs +++ b/lib/src/files.rs @@ -16,7 +16,6 @@ use std::collections::VecDeque; use std::fmt::{Debug, Error, Formatter}; -use std::ops::Range; use itertools::Itertools; @@ -159,14 +158,6 @@ pub enum MergeResult { Conflict(Vec>), } -/// A region where the base and two sides match. -#[derive(Debug, PartialEq, Eq, Clone)] -struct SyncRegion { - base: Range, - left: Range, - right: Range, -} - pub fn merge(slices: &Merge<&[u8]>) -> MergeResult { // TODO: Using the first remove as base (first in the inputs) is how it's // usually done for 3-way conflicts. Are there better heuristics when there are