Skip to content

Commit

Permalink
remove some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
catornot committed Mar 22, 2024
1 parent 117a9fc commit 66d8ded
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/high/squirrel_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use crate::{
get_sq_vector, push_sq_array, push_sq_bool, push_sq_float, push_sq_int, push_sq_object,
push_sq_string, push_sq_vector, sqvm_to_context,
},
utils::to_cstring,
},
prelude::*,
};
Expand Down Expand Up @@ -123,7 +124,7 @@ impl<T: PushToSquirrelVm, E: ToString> ReturnToVm for Result<T, E> {
T::DEFAULT_RESULT
}
Err(err) => {
let err = crate::to_c_string!(err.to_string());
let err = to_cstring(err.to_string().as_str());
unsafe { (sqfunctions.sq_raiseerror)(sqvm.as_ptr(), err.as_ptr()) };
SQRESULT::SQRESULT_ERROR
}
Expand Down

0 comments on commit 66d8ded

Please sign in to comment.