fix(rust): switch to stable

This commit is contained in:
Harsh Shandilya 2025-02-28 15:51:06 +05:30
parent 88418f7c46
commit 5c40422e41
4 changed files with 22 additions and 21 deletions

View file

@ -42,7 +42,7 @@
rustNightly = (import fenix { inherit pkgs; }).fromToolchainFile { rustNightly = (import fenix { inherit pkgs; }).fromToolchainFile {
file = ./rust-toolchain.toml; file = ./rust-toolchain.toml;
sha256 = "sha256-XPGNBesOSwZJCXgynlavqa5QdsTAnodTmbx6t6XUWsY="; sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU=";
}; };
craneLib = (crane.mkLib pkgs).overrideToolchain rustNightly; craneLib = (crane.mkLib pkgs).overrideToolchain rustNightly;

View file

@ -1,5 +1,5 @@
[toolchain] [toolchain]
channel = "nightly-2024-12-15" channel = "1.85.0"
components = ["clippy", "rustfmt", "rust-src"] components = ["clippy", "rustfmt", "rust-src"]
targets = ["x86_64-unknown-linux-gnu"] targets = ["x86_64-unknown-linux-gnu"]
profile = "minimal" profile = "minimal"

View file

@ -57,24 +57,26 @@ pub fn freeze_repos(dir: &str) -> anyhow::Result<()> {
let repository = shared_repo.to_thread_local(); let repository = shared_repo.to_thread_local();
let branch = get_current_branch(&repository); let branch = get_current_branch(&repository);
let remote = get_remote_for_branch(&repository, branch.as_deref()); let remote = get_remote_for_branch(&repository, branch.as_deref());
if let Some(branch) = branch let Some(branch) = branch else {
&& let Some(remote) = remote continue;
{ };
let remote_url = get_url(&repository, &remote); let Some(remote) = remote else {
let relative_path = entry continue;
.path() };
.strip_prefix(Path::new(dir))? let remote_url = get_url(&repository, &remote);
.to_str() let relative_path = entry
.unwrap() .path()
.to_string(); .strip_prefix(Path::new(dir))?
repos.insert( .to_str()
relative_path, .unwrap()
PersistableRepo { .to_string();
remote_url, repos.insert(
head: branch, relative_path,
}, PersistableRepo {
); remote_url,
} head: branch,
},
);
} }
} }
} }

View file

@ -1,4 +1,3 @@
#![feature(let_chains)]
#![allow(clippy::missing_errors_doc, clippy::missing_panics_doc)] #![allow(clippy::missing_errors_doc, clippy::missing_panics_doc)]
pub mod cli; pub mod cli;
pub mod git; pub mod git;