mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-25 21:25:03 +00:00
Offchain testing: Fix reading response (#10294)
This commit is contained in:
1 parent
f037651788
commit
506ca48dc8
2 files changed
+33
-1
No files matched your search
@@ -341,7 +341,7 @@ impl offchain::Externalities for TestOffchainExt {
|
||||
Ok(0)
|
||||
} else {
|
||||
let read = std::cmp::min(buffer.len(), response[req.read..].len());
|
||||
buffer[0..read].copy_from_slice(&response[req.read..read]);
|
||||
buffer[0..read].copy_from_slice(&response[req.read..req.read + read]);
|
||||
req.read += read;
|
||||
Ok(read)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user