From c1a4ed50279761bf3d206250549e2dd33c4730ea Mon Sep 17 00:00:00 2001 From: Virx Date: Wed, 18 Dec 2024 18:43:36 -0500 Subject: [PATCH] Bump verison --- Cargo.lock | 14 +++++++------- Cargo.toml | 2 +- pytest.py | 2 +- src/lib.rs | 7 ++----- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a00f339..cd7c44c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ dependencies = [ [[package]] name = "rlbot-flatbuffers-py" -version = "0.11.2" +version = "0.11.3" dependencies = [ "flatbuffers", "get-size", @@ -298,24 +298,24 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 208b3e1..0df81bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rlbot-flatbuffers-py" -version = "0.11.2" +version = "0.11.3" edition = "2021" description = "A Python module implemented in Rust for serializing and deserializing RLBot's flatbuffers" repository = "https://github.com/VirxEC/rlbot_flatbuffers_py" diff --git a/pytest.py b/pytest.py index ea34987..217ec78 100644 --- a/pytest.py +++ b/pytest.py @@ -159,7 +159,7 @@ def random_script_config(): print("Running quick benchmark...") - num_trials = 60_000 + num_trials = 10_000 total_make_time = 0 total_pack_time = 0 diff --git a/src/lib.rs b/src/lib.rs index 8e68b0f..6a4c3bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,7 +44,6 @@ impl FromGil for U where U: From, { - #[inline] fn from_gil(_py: Python, obj: T) -> Self { Self::from(obj) } @@ -58,7 +57,6 @@ impl IntoGil for T where U: FromGil, { - #[inline] fn into_gil(self, py: Python) -> U { U::from_gil(py, self) } @@ -87,17 +85,16 @@ pub trait PyDefault: Sized + PyClass { } impl>> PyDefault for T { + #[inline(never)] fn py_default(py: Python) -> Py { Py::new(py, Self::default()).unwrap() } } -static NONE_STR: &str = "None"; - #[must_use] #[inline(never)] pub fn none_str() -> String { - String::from(NONE_STR) + String::from("None") } #[must_use]