Skip to content

Commit 75d4b6d

Browse files
committed
quic: Fix lint
1 parent 5a9965a commit 75d4b6d

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed

src/dataqueue/queue.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,9 @@ class DataQueueImpl final : public DataQueue,
226226
};
227227

228228
void
229-
reader_destructed(NotifyReader* reader) {
230-
readers_.erase(reader);
231-
}
229+
reader_destructed(NotifyReader* reader) { readers_.erase(reader); }
232230

233-
void SetEnvironment(Environment* env) override { env_ = env;}
231+
void SetEnvironment(Environment* env) override { env_ = env; }
234232

235233
std::shared_ptr<Reader> get_reader() override;
236234
SET_MEMORY_INFO_NAME(DataQueue)
@@ -1198,8 +1196,7 @@ class FdEntry final : public EntryImpl {
11981196
// ============================================================================
11991197

12001198
std::shared_ptr<DataQueue> DataQueue::CreateIdempotent(
1201-
Environment * env,
1202-
std::vector<std::unique_ptr<Entry>> list) {
1199+
Environment * env, std::vector<std::unique_ptr<Entry>> list) {
12031200
// Any entry is invalid for an idempotent DataQueue if any of the entries
12041201
// are nullptr or is not idempotent.
12051202
uint64_t size = 0;
@@ -1258,7 +1255,7 @@ DataQueue::CreateInMemoryEntryFromBackingStore(
12581255
if (offset + length > store->ByteLength()) {
12591256
return nullptr;
12601257
}
1261-
return std::make_unique<InMemoryEntry>(std::move(store), offset, length);
1258+
return std::make_unique<InMemoryEntry>(std::move(store), offset, length);
12621259
}
12631260

12641261
std::unique_ptr<DataQueue::Entry> DataQueue::CreateDataQueueEntry(
@@ -1289,7 +1286,6 @@ void DataQueueFeeder::setDataQueue(std::shared_ptr<DataQueue> queue) {
12891286
queue->SetEnvironment(env());
12901287
dataQueue_ = queue;
12911288

1292-
12931289
// Allows us to be notified when data is actually read from the
12941290
// queue so that we can limit the data hold in DataQueueFeeder
12951291
dataQueue_->addBackpressureListener(this);

src/dataqueue/queue.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,13 @@ class DataQueue : public MemoryRetainer {
208208
// of entries. All of the entries must also be idempotent otherwise
209209
// an empty std::unique_ptr will be returned.
210210
static std::shared_ptr<DataQueue> CreateIdempotent(
211-
Environment* env,
212-
std::vector<std::unique_ptr<Entry>> list);
211+
Environment* env, std::vector<std::unique_ptr<Entry>> list);
213212

214213
// Creates a non-idempotent DataQueue. This kind of queue can be
215214
// mutated and updated such that multiple reads are not guaranteed
216215
// to produce the same result. The entries added can be of any type.
217216
static std::shared_ptr<DataQueue> Create(
218-
Environment* env,
219-
std::optional<uint64_t> capped = std::nullopt);
217+
Environment* env, std::optional<uint64_t> capped = std::nullopt);
220218

221219
// Creates an idempotent Entry from a v8::ArrayBufferView. To help
222220
// ensure idempotency, the underlying ArrayBuffer is detached from
@@ -329,7 +327,7 @@ class DataQueue : public MemoryRetainer {
329327
};
330328

331329
class DataQueueFeeder final : public AsyncWrap,
332-
public DataQueue::BackpressureListener {
330+
public DataQueue::BackpressureListener {
333331
public:
334332
using Next = bob::Next<DataQueue::Vec>;
335333

src/node_blob.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,8 @@ void BlobFromFilePath(const FunctionCallbackInfo<Value>& args) {
110110
std::vector<std::unique_ptr<DataQueue::Entry>> entries;
111111
entries.push_back(std::move(entry));
112112

113-
if (auto blob =
114-
Blob::Create(env,
115-
DataQueue::CreateIdempotent(env, std::move(entries)))) {
113+
if (auto blob = Blob::Create(
114+
env, DataQueue::CreateIdempotent(env, std::move(entries)))) {
116115
Local<Value> vals[2]{
117116
blob->object(),
118117
Uint32::NewFromUnsigned(env->isolate(), blob->length()),
@@ -364,9 +363,9 @@ void Blob::Reader::Pull(const FunctionCallbackInfo<Value>& args) {
364363
impl->env = env;
365364

366365
auto next = [impl, reader](int status,
367-
const DataQueue::Vec* vecs,
368-
size_t count,
369-
bob::Done doneCb) mutable {
366+
const DataQueue::Vec* vecs,
367+
size_t count,
368+
bob::Done doneCb) mutable {
370369
Environment* env = impl->env;
371370
HandleScope handleScope(env->isolate());
372371
Local<Function> fn = impl->callback.Get(env->isolate());

0 commit comments

Comments
 (0)