Skip to content

Commit

Permalink
fix function signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
jewlexx committed Nov 27, 2024
1 parent c00c35b commit 8635aef
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl<'a> SprinklesVersion<'a> {
}
}

fn write_colours(file: &mut impl Write) -> std::io::Result<()> {
fn write_colours(mut file: &File) -> std::io::Result<()> {
writeln!(file, "pub mod colours {{")?;
writeln!(file, "#![allow(unused_imports)]")?;
writeln!(file, "// This file is autogenerated")?;
Expand Down Expand Up @@ -234,7 +234,7 @@ fn main() -> Result<(), Box<dyn Error>> {
Ok(())
}

fn append_shadow_hooks(file: &mut File) -> shadow_rs::SdResult<()> {
fn append_shadow_hooks(mut file: &File) -> shadow_rs::SdResult<()> {
let sfsu_contribs = {
let contributors = get_contributors(("winpax", "sfsu"));

Expand Down Expand Up @@ -263,11 +263,13 @@ fn append_shadow_hooks(file: &mut File) -> shadow_rs::SdResult<()> {

writeln!(file, "pub mod sprinkles {{\n{sprinkles_contribs}\n}}")?;

let lockfile = LOCKFILE.parse::<DocumentMut>().expect("Failed to parse Cargo.lock");
let lockfile = LOCKFILE
.parse::<DocumentMut>()
.expect("Failed to parse Cargo.lock");

writeln!(file, "{}", get_packages(&lockfile))?;

write_colours(&mut file)?;
write_colours(file)?;

Ok(())
}

0 comments on commit 8635aef

Please sign in to comment.