Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clippy: disable bogus lints for nightly clippy #3452

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cli/src/commit_templater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,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
Expand Down
2 changes: 2 additions & 0 deletions cli/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions lib/src/commit_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions lib/src/local_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/local_working_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions lib/src/stacked_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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![];
Expand Down