libstore: remove curlFileTransfer::enqueueItem return type

it's used only once, and the transfer is used for something else
afterwards as well. returning it hides that the same transfer is
being returned unchanged, and pointlessly extends the signature.

Change-Id: Idbd0af00f9aebd3606f6b537b9b7cc9263a45cf7
This commit is contained in:
eldritch horrors 2024-11-09 01:17:28 +01:00
parent 60e984f0cf
commit 1338e93bc9

View file

@ -712,7 +712,7 @@ struct curlFileTransfer : public FileTransfer
} }
} }
std::shared_ptr<TransferItem> enqueueItem(std::shared_ptr<TransferItem> item) void enqueueItem(std::shared_ptr<TransferItem> item)
{ {
if (item->uploadData if (item->uploadData
&& !item->uri.starts_with("http://") && !item->uri.starts_with("http://")
@ -726,7 +726,6 @@ struct curlFileTransfer : public FileTransfer
state->incoming.push(item); state->incoming.push(item);
} }
wakeup(); wakeup();
return item;
} }
#if ENABLE_S3 #if ENABLE_S3
@ -857,7 +856,7 @@ struct curlFileTransfer : public FileTransfer
auto _state = std::make_shared<Sync<State>>(); auto _state = std::make_shared<Sync<State>>();
auto item = enqueueItem(std::make_shared<TransferItem>( auto item = std::make_shared<TransferItem>(
*this, *this,
uri, uri,
headers, headers,
@ -888,7 +887,8 @@ struct curlFileTransfer : public FileTransfer
}, },
std::move(data), std::move(data),
noBody noBody
)); );
enqueueItem(item);
struct TransferSource : Source struct TransferSource : Source
{ {