Skip to content

Commit be4ba70

Browse files
committed
Fix Windows error
1 parent cb1e914 commit be4ba70

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

codegen/class_inject.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ pub fn classes_to_lib_rs(type_data: &[PythonBindType]) -> io::Result<()> {
1313

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

16+
#[cfg(windows)]
17+
{
18+
lib_rs = lib_rs.replace("\r\n", "\n");
19+
}
20+
1621
let start = lib_rs.find(" classes: [\n").unwrap();
1722
let end = lib_rs[start..].find("],").unwrap() + 2;
1823

0 commit comments

Comments
 (0)