Skip to content

Commit e4533b7

Browse files
Leeeon233konn
andauthored
fix: builtin bytes type missing (#129)
According to pyo3's [documentation](https://pyo3.rs/v0.23.3/conversions/tables.html#returning-rust-values-to-python), `Cow<[u8]>` in Rust is Python's `bytes` type, but this mapping is currently not implemented in the crate. Co-authored-by: Hiromi Ishii <[email protected]>
1 parent dd7bf37 commit e4533b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pyo3-stub-gen/src/stub_type/builtins.rs

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ impl_builtin!(String, "str");
5959
impl_builtin!(OsString, "str");
6060
impl_builtin!(Cow<'_, str>, "str");
6161
impl_builtin!(Cow<'_, OsStr>, "str");
62+
impl_builtin!(Cow<'_, [u8]>, "bytes");
6263

6364
impl PyStubType for PathBuf {
6465
fn type_output() -> TypeInfo {

0 commit comments

Comments
 (0)