ok/jj
1
0
Fork 0
forked from mirrors/jj

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).
This commit is contained in:
Ilya Grigoriev 2024-03-19 16:42:39 -07:00
parent 1ec6a8f92d
commit 4fbe6aecc9
2 changed files with 0 additions and 10 deletions

View file

@ -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 = <TestTemplateLanguage as TemplateLanguage<'static>>::Property;

View file

@ -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<Merge<ContentHunk>>),
}
/// A region where the base and two sides match.
#[derive(Debug, PartialEq, Eq, Clone)]
struct SyncRegion {
base: Range<usize>,
left: Range<usize>,
right: Range<usize>,
}
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