Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airectly call signal handler #43

Merged
merged 3 commits into from
Oct 18, 2024
Merged

Airectly call signal handler #43

merged 3 commits into from
Oct 18, 2024

Conversation

gadomski
Copy link
Collaborator

What I am changing

  • Not super-imporant I don't think, but it feels better to use call1 instead of run_bound on some Python code.

How you can test it

  • maturin develop -m python/Cargo.toml --uv && cql2 then hit ctrl-C

Not super-imporant I don't think, but it feels better to use `call1` instead of
`run_bound` on some Python code.
@gadomski gadomski self-assigned this Oct 18, 2024
@@ -2,6 +2,7 @@ use thiserror::Error;

/// Crate-specific error enum.
#[derive(Debug, Error)]
#[allow(clippy::large_enum_variant)]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The size difference isn't that big, and for a non-performance-critical repo like this one I think it's ok to let this one slide.

  --> src/error.rs:5:1
   |
5  | / pub enum Error {
6  | |     /// [geojson::Error]
7  | |     #[error(transparent)]
8  | |     GeoJSON(#[from] geojson::Error),
   | |     ------------------------------- the largest variant contains at least 320 bytes
...  |
66 | |     Validation(serde_json::Value),
   | |     ----------------------------- the second-largest variant contains at least 72 bytes
67 | | }
   | |_^ the entire enum is at least 320 bytes
   |

Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that calling Python methods is better than running a Python string

@gadomski gadomski merged commit 81af07a into main Oct 18, 2024
18 checks passed
@gadomski gadomski deleted the call-signal-directly branch October 18, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants