Skip to content

Commit

Permalink
clippy: remove some unused code beta clippy/rustc compain about
Browse files Browse the repository at this point in the history
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: rust-lang/rust-clippy#12467
> and rust-lang/rust-clippy#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).
  • Loading branch information
ilyagr committed Mar 20, 2024
1 parent 1ec6a8f commit 4fbe6ae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion cli/src/template_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 0 additions & 9 deletions lib/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use std::collections::VecDeque;
use std::fmt::{Debug, Error, Formatter};
use std::ops::Range;

use itertools::Itertools;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4fbe6ae

Please sign in to comment.