projects
/
ldk-c-bindings
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement conversion of std::io::Error to Rust
[ldk-c-bindings]
/
c-bindings-gen
/
src
/
types.rs
diff --git
a/c-bindings-gen/src/types.rs
b/c-bindings-gen/src/types.rs
index bd0c9c5ceecc8cfcb4aaa8ce175cda800d73ddab..6ea8e284a5286e1e267d01082ab6e8a0967007b6 100644
(file)
--- a/
c-bindings-gen/src/types.rs
+++ b/
c-bindings-gen/src/types.rs
@@
-950,6
+950,7
@@
impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
"str" if is_ref => Some(""),
"alloc::string::String"|"String" => Some(""),
"str" if is_ref => Some(""),
"alloc::string::String"|"String" => Some(""),
+ "std::io::Error" if !is_ref => Some(""),
// Note that we'll panic for String if is_ref, as we only have non-owned memory, we
// cannot create a &String.
// Note that we'll panic for String if is_ref, as we only have non-owned memory, we
// cannot create a &String.
@@
-1016,6
+1017,7
@@
impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
"str" if is_ref => Some(".into_str()"),
"alloc::string::String"|"String" => Some(".into_string()"),
"str" if is_ref => Some(".into_str()"),
"alloc::string::String"|"String" => Some(".into_string()"),
+ "std::io::Error" if !is_ref => Some(".to_rust()"),
"std::time::Duration"|"core::time::Duration" => Some(")"),
"std::time::SystemTime" => Some("))"),
"std::time::Duration"|"core::time::Duration" => Some(")"),
"std::time::SystemTime" => Some("))"),