diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-12-13 19:10:39 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-12-13 19:10:39 +0100 |
commit | ac9cc2ec08e95910ecb73745cb011596a33723f0 (patch) | |
tree | 24ac2a81d83b0a71d094e57d38c6a67266302607 /src/libutil/rust-ffi.hh | |
parent | b4edc3ca61c1f1a98052ec8ffc41d1b533b08fd7 (diff) |
Move some code
Diffstat (limited to 'src/libutil/rust-ffi.hh')
-rw-r--r-- | src/libutil/rust-ffi.hh | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libutil/rust-ffi.hh b/src/libutil/rust-ffi.hh index 4fecce606..3b51661c2 100644 --- a/src/libutil/rust-ffi.hh +++ b/src/libutil/rust-ffi.hh @@ -140,12 +140,7 @@ struct Source : fun(sourceWrapper), _this(&_this) {} - // FIXME: how to propagate exceptions? - static size_t sourceWrapper(void * _this, rust::Slice<uint8_t> data) - { - auto n = ((nix::Source *) _this)->read((unsigned char *) data.ptr, data.size); - return n; - } + static size_t sourceWrapper(void * _this, rust::Slice<uint8_t> data); }; /* C++ representation of Rust's Result<T, CppException>. */ |