Skip to content

Commit

Permalink
Fix Windows error
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC committed Jun 24, 2024
1 parent cb1e914 commit be4ba70
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions codegen/class_inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ pub fn classes_to_lib_rs(type_data: &[PythonBindType]) -> io::Result<()> {

let mut lib_rs = fs::read_to_string("src/lib.rs")?;

#[cfg(windows)]
{
lib_rs = lib_rs.replace("\r\n", "\n");
}

let start = lib_rs.find(" classes: [\n").unwrap();
let end = lib_rs[start..].find("],").unwrap() + 2;

Expand Down

0 comments on commit be4ba70

Please sign in to comment.