Skip to content

Commit 52756ea

Browse files
committed
update toolchain to avoid miscompilation
1 parent 7a717af commit 52756ea

File tree

15 files changed

+18
-119
lines changed

15 files changed

+18
-119
lines changed

crates/but-action/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ mod grouping;
2727
mod openai;
2828
pub mod rename_branch;
2929
pub mod reword;
30-
mod serialize;
3130
mod simple;
3231
mod workflow;
3332
pub use action::ActionListing;

crates/but-action/src/serialize.rs

Lines changed: 0 additions & 74 deletions
This file was deleted.

crates/but-graph/src/init/post.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ impl Graph {
813813
self[sidx]
814814
.ref_name
815815
.as_ref()
816-
.filter(|rn| (rn.category() == Some(Category::RemoteBranch)))
816+
.filter(|rn| rn.category() == Some(Category::RemoteBranch))
817817
.map(|rn| (sidx, rn))
818818
}) {
819819
remote_sidx_by_ref_name.insert(remote_ref_name.clone(), remote_sidx);

crates/but-hunk-assignment/src/state.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
/// The name of the file holding our state, useful for watching for changes.
22
use anyhow::Result;
33
use gitbutler_command_context::CommandContext;
4-
use serde::{Deserialize, Serialize};
54

65
use crate::HunkAssignment;
76

8-
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
9-
pub struct HunkAssignments {
10-
pub assignments: Vec<HunkAssignment>,
11-
}
12-
137
pub fn assignments(ctx: &mut CommandContext) -> Result<Vec<HunkAssignment>> {
148
let assignments = ctx
159
.db()?

crates/but-hunk-dependency/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(unsigned_signed_diff)]
21
#![deny(missing_docs)]
32

43
//! ## Module Guidelines

crates/but/src/rub/undo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ pub(crate) fn stack_id_by_commit_id(
2929
}) {
3030
return Ok(*id);
3131
}
32-
anyhow::bail!("No stack found for commit {}", oid.to_string())
32+
anyhow::bail!("No stack found for commit {}", oid)
3333
}

crates/gitbutler-branch-actions/src/branch_manager/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct BranchManager<'l> {
2424
}
2525

2626
pub trait BranchManagerExt {
27-
fn branch_manager(&self) -> BranchManager;
27+
fn branch_manager(&self) -> BranchManager<'_>;
2828
}
2929

3030
impl BranchManagerExt for CommandContext {

crates/gitbutler-branch-actions/src/virtual.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::{hunk::VirtualBranchHunk, status::get_applied_status_cached, VirtualBranchesExt};
22
use anyhow::{anyhow, bail, Context, Result};
3-
use bstr::BString;
43
use but_rebase::RebaseStep;
54
use but_workspace::stack_ext::StackExt;
65
use gitbutler_branch::dedup;
@@ -10,8 +9,7 @@ use gitbutler_command_context::CommandContext;
109
use gitbutler_commit::commit_ext::CommitExt;
1110
use gitbutler_diff::GitHunk;
1211
use gitbutler_oxidize::{
13-
git2_signature_to_gix_signature, git2_to_gix_object_id, gix_to_git2_oid, GixRepositoryExt,
14-
ObjectIdExt, OidExt,
12+
git2_to_gix_object_id, gix_to_git2_oid, GixRepositoryExt, ObjectIdExt, OidExt,
1513
};
1614
use gitbutler_project::AUTO_TRACK_LIMIT_BYTES;
1715
use gitbutler_reference::{normalize_branch_name, Refname, RemoteRefname};
@@ -66,26 +64,6 @@ impl From<but_workspace::ui::Author> for crate::author::Author {
6664
}
6765
}
6866

69-
/// The commit-data we can use for comparison to see which remote-commit was used to craete
70-
/// a local commit from.
71-
/// Note that trees can't be used for comparison as these are typically rebased.
72-
#[derive(Debug, Hash, Eq, PartialEq)]
73-
pub(crate) struct CommitData {
74-
message: BString,
75-
author: gix::actor::Signature,
76-
}
77-
78-
impl TryFrom<&git2::Commit<'_>> for CommitData {
79-
type Error = anyhow::Error;
80-
81-
fn try_from(commit: &git2::Commit<'_>) -> std::result::Result<Self, Self::Error> {
82-
Ok(CommitData {
83-
message: commit.message_raw_bytes().into(),
84-
author: git2_signature_to_gix_signature(commit.author()),
85-
})
86-
}
87-
}
88-
8967
pub fn update_stack(ctx: &CommandContext, update: &BranchUpdateRequest) -> Result<Stack> {
9068
let vb_state = ctx.project().virtual_branches();
9169
let mut stack = vb_state.get_stack_in_workspace(update.id.context("BUG(opt-stack-id)")?)?;

crates/gitbutler-cherry-pick/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ pub trait RepositoryExt {
3939
///
4040
/// Unless you want to find a particular side, you likely want to pass Default::default()
4141
/// as the [`side`](ConflictedTreeKey) which will give the automatically resolved resolution
42-
fn find_real_tree(&self, commit: &git2::Commit, side: ConflictedTreeKey) -> Result<git2::Tree>;
42+
fn find_real_tree(
43+
&self,
44+
commit: &git2::Commit,
45+
side: ConflictedTreeKey,
46+
) -> Result<git2::Tree<'_>>;
4347
}
4448

4549
pub trait GixRepositoryExt {

crates/gitbutler-hunk-dependency/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(unsigned_signed_diff)]
21
pub(crate) mod hunk;
32
pub mod input;
43
pub mod locks;

0 commit comments

Comments
 (0)