mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-26 14:00:51 +00:00
clippy: disable bogus lints for nightly clippy
The nightly compiler has several clippy fix-its that, if applied, break the build. There are various bugs about this, but there isn't enough space in the margins to detail it all. Just ignore these on a per-function basis; about 70% of them are just multiple instances happening inside a single function. This makes `cargo clippy --workspace --all-targets` run clean, even with the nightly compiler. Signed-off-by: Austin Seipp <aseipp@pobox.com> Change-Id: Ic26a025d3c62b12fbf096171308b56e38f7d1bb9
This commit is contained in:
parent
a364310b56
commit
4b45dde8c6
6 changed files with 14 additions and 0 deletions
|
@ -735,6 +735,8 @@ impl RefNamesIndex {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unknown_lints)] // XXX FIXME (aseipp): nightly bogons; re-test this occasionally
|
||||
#[allow(clippy::manual_unwrap_or_default)]
|
||||
pub fn get(&self, id: &CommitId) -> &[RefName] {
|
||||
if let Some(names) = self.index.get(id) {
|
||||
names
|
||||
|
|
|
@ -479,6 +479,8 @@ impl Ui {
|
|||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
#[allow(unknown_lints)] // XXX FIXME (aseipp): nightly bogons; re-test this occasionally
|
||||
#[allow(clippy::assigning_clones)]
|
||||
pub fn prompt(&self, prompt: &str) -> io::Result<String> {
|
||||
if !Self::can_prompt() {
|
||||
return Err(io::Error::new(
|
||||
|
|
|
@ -63,6 +63,8 @@ impl CommitBuilder<'_> {
|
|||
}
|
||||
|
||||
/// Only called from [`MutRepo::rewrite_commit`]. Use that function instead.
|
||||
#[allow(unknown_lints)] // XXX FIXME (aseipp): nightly bogons; re-test this occasionally
|
||||
#[allow(clippy::assigning_clones)]
|
||||
pub(crate) fn for_rewrite_from<'repo>(
|
||||
mut_repo: &'repo mut MutableRepo,
|
||||
settings: &UserSettings,
|
||||
|
|
|
@ -306,6 +306,8 @@ impl Backend for LocalBackend {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unknown_lints)] // XXX FIXME (aseipp): nightly bogons; re-test this occasionally
|
||||
#[allow(clippy::assigning_clones)]
|
||||
pub fn commit_to_proto(commit: &Commit) -> crate::protos::local_store::Commit {
|
||||
let mut proto = crate::protos::local_store::Commit::default();
|
||||
for parent in &commit.parents {
|
||||
|
|
|
@ -615,6 +615,8 @@ impl TreeState {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(unknown_lints)] // XXX FIXME (aseipp): nightly bogons; re-test this occasionally
|
||||
#[allow(clippy::assigning_clones)]
|
||||
fn save(&mut self) -> Result<(), TreeStateError> {
|
||||
let mut proto: crate::protos::working_copy::TreeState = Default::default();
|
||||
match &self.tree_id {
|
||||
|
|
|
@ -223,6 +223,8 @@ impl MutableTable {
|
|||
other.segment_add_entries_to(self);
|
||||
}
|
||||
|
||||
#[allow(unknown_lints)] // XXX FIXME (aseipp): nightly bogons; re-test this occasionally
|
||||
#[allow(clippy::assigning_clones)]
|
||||
fn merge_in(&mut self, other: &Arc<ReadonlyTable>) {
|
||||
let mut maybe_own_ancestor = self.parent_file.clone();
|
||||
let mut maybe_other_ancestor = Some(other.clone());
|
||||
|
@ -281,6 +283,8 @@ impl MutableTable {
|
|||
/// If the MutableTable has more than half the entries of its parent
|
||||
/// ReadonlyTable, return MutableTable with the commits from both. This
|
||||
/// is done recursively, so the stack of index files has O(log n) files.
|
||||
#[allow(unknown_lints)] // XXX FIXME (aseipp): nightly bogons; re-test this occasionally
|
||||
#[allow(clippy::assigning_clones)]
|
||||
fn maybe_squash_with_ancestors(self) -> MutableTable {
|
||||
let mut num_new_entries = self.entries.len();
|
||||
let mut files_to_squash = vec![];
|
||||
|
|
Loading…
Reference in a new issue