Skip to content

Commit

Permalink
Use MAIN_SEPARATOR for error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC committed Jan 2, 2025
1 parent bc7a671 commit b8d513c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mod python;

use pyo3::{create_exception, exceptions::PyValueError, prelude::*, PyClass};
use python::*;
use std::panic::Location;
use std::{panic::Location, path::MAIN_SEPARATOR};

create_exception!(
rlbot_flatbuffers,
Expand All @@ -30,7 +30,7 @@ create_exception!(
pub fn flat_err_to_py(err: flatbuffers::InvalidFlatbuffer) -> PyErr {
let caller = Location::caller();
let err_msg = format!(
"Can't make flatbuffer @ \"rlbot_flatbuffers/{}\":\n {err}",
"Can't make flatbuffer @ \"rlbot_flatbuffers{MAIN_SEPARATOR}{}\":\n {err}",
caller.file()
);
InvalidFlatbuffer::new_err(err_msg)
Expand Down

0 comments on commit b8d513c

Please sign in to comment.