Skip to content

Commit 23f0f03

Browse files
committed
feat: filter HTTP requests
3 parents 44a9694 + b81df16 + 213e822 commit 23f0f03

File tree

10 files changed

+721
-87
lines changed

10 files changed

+721
-87
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ datafusion-udf-wasm-arrow2bytes = { path = "arrow2bytes", version = "0.1.0" }
2323
datafusion-udf-wasm-bundle = { path = "guests/bundle", version = "0.1.0" }
2424
datafusion-udf-wasm-guest = { path = "guests/rust", version = "0.1.0" }
2525
datafusion-udf-wasm-python = { path = "guests/python", version = "0.1.0" }
26+
http = { version = "1.3.1", default-features = false }
27+
hyper = { version = "1.7", default-features = false }
2628
tokio = { version = "1.48.0", default-features = false }
2729
pyo3 = { version = "0.27.0", default-features = false, features = ["macros"] }
2830
tar = { version = "0.4.44", default-features = false }

guests/python/src/python_modules/error.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
//! Error handling helpers.
22
use pyo3::{exceptions::PyValueError, prelude::*};
33

4+
/// Implements [`Display`](std::fmt::Display) by just forwarding it to [`Debug`](std::fmt::Debug).
5+
macro_rules! display_like_debug {
6+
($struct:ident) => {
7+
impl ::std::fmt::Display for $struct {
8+
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
9+
::std::fmt::Debug::fmt(self, f)
10+
}
11+
}
12+
};
13+
}
14+
15+
pub(crate) use display_like_debug;
16+
417
/// A resource (handle) was already used/moved/closed.
518
#[derive(Debug, Default, Clone, Copy)]
619
pub(crate) struct ResourceMoved;
720

8-
impl std::fmt::Display for ResourceMoved {
9-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10-
write!(f, "ResourceMoved")
11-
}
12-
}
21+
display_like_debug!(ResourceMoved);
1322

1423
impl std::error::Error for ResourceMoved {}
1524

0 commit comments

Comments
 (0)