Skip to content

Commit b8d513c

Browse files
committed
Use MAIN_SEPARATOR for error msg
1 parent bc7a671 commit b8d513c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mod python;
1616

1717
use pyo3::{create_exception, exceptions::PyValueError, prelude::*, PyClass};
1818
use python::*;
19-
use std::panic::Location;
19+
use std::{panic::Location, path::MAIN_SEPARATOR};
2020

2121
create_exception!(
2222
rlbot_flatbuffers,
@@ -30,7 +30,7 @@ create_exception!(
3030
pub fn flat_err_to_py(err: flatbuffers::InvalidFlatbuffer) -> PyErr {
3131
let caller = Location::caller();
3232
let err_msg = format!(
33-
"Can't make flatbuffer @ \"rlbot_flatbuffers/{}\":\n {err}",
33+
"Can't make flatbuffer @ \"rlbot_flatbuffers{MAIN_SEPARATOR}{}\":\n {err}",
3434
caller.file()
3535
);
3636
InvalidFlatbuffer::new_err(err_msg)

0 commit comments

Comments
 (0)