lib/curl: use std::span
This commit is contained in:

committed by
Max Kellermann

parent
062df65b1e
commit
1da09f5b1b
@@ -48,9 +48,9 @@ public:
|
||||
i.first.c_str(), i.second.c_str());
|
||||
}
|
||||
|
||||
void OnData(ConstBuffer<void> data) override {
|
||||
void OnData(std::span<const std::byte> data) override {
|
||||
try {
|
||||
if (fwrite(data.data, data.size, 1, stdout) != 1)
|
||||
if (fwrite(data.data(), data.size(), 1, stdout) != 1)
|
||||
throw std::runtime_error("Failed to write");
|
||||
} catch (...) {
|
||||
OnError(std::current_exception());
|
||||
|
Reference in New Issue
Block a user