Skip to content

Commit e4be70c

Browse files
zertoshfacebook-github-bot
authored andcommitted
Apply clang-format update fixes
Reviewed By: igorsugak Differential Revision: D25861960 fbshipit-source-id: e3c39c080429058a58cdc66d45350e5d1420f98c
1 parent e43ed46 commit e4be70c

File tree

7 files changed

+33
-40
lines changed

7 files changed

+33
-40
lines changed

rsocket/RSocketResponder.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,24 +126,24 @@ class RSocketResponderAdapter : public RSocketResponderCore {
126126
std::shared_ptr<yarpl::flowable::Subscriber<Payload>> handleRequestChannel(
127127
Payload request,
128128
StreamId streamId,
129-
std::shared_ptr<yarpl::flowable::Subscriber<Payload>>
130-
response) noexcept override;
129+
std::shared_ptr<yarpl::flowable::Subscriber<Payload>> response) noexcept
130+
override;
131131

132132
/// Internal method for handling stream requests, not intended to be used
133133
/// by application code.
134134
void handleRequestStream(
135135
Payload request,
136136
StreamId streamId,
137-
std::shared_ptr<yarpl::flowable::Subscriber<Payload>>
138-
response) noexcept override;
137+
std::shared_ptr<yarpl::flowable::Subscriber<Payload>> response) noexcept
138+
override;
139139

140140
/// Internal method for handling request-response requests, not intended to be
141141
/// used by application code.
142142
void handleRequestResponse(
143143
Payload request,
144144
StreamId streamId,
145-
std::shared_ptr<yarpl::single::SingleObserver<Payload>>
146-
response) noexcept override;
145+
std::shared_ptr<yarpl::single::SingleObserver<Payload>> response) noexcept
146+
override;
147147

148148
void handleFireAndForget(Payload request, StreamId streamId) override;
149149
void handleMetadataPush(std::unique_ptr<folly::IOBuf> buf) override;

rsocket/benchmarks/StreamThroughputMemory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ class Factory : public ConnectionFactory {
140140
ProtocolVersion,
141141
ResumeStatus /* unused */) override {
142142
return folly::via(worker_.getEventBase(), [this] {
143-
return ConnectedDuplexConnection{std::move(connection_),
144-
*worker_.getEventBase()};
143+
return ConnectedDuplexConnection{
144+
std::move(connection_), *worker_.getEventBase()};
145145
});
146146
}
147147

rsocket/examples/stream-observable-to-flowable/StreamObservableToFlowable_Server.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ class PushStreamRequestResponder : public rsocket::RSocketResponder {
7373
std::string payloadData = ss.str();
7474
s->onNext(Payload(payloadData, "metadata"));
7575
}
76-
})
77-
.detach();
76+
}).detach();
7877
})
7978
->toFlowable(BackpressureStrategy::DROP);
8079
}

rsocket/test/RequestChannelTest.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,13 @@ TEST(RequestChannelTest, TestLargePayload) {
442442
return Payload(seedPayload.data->clone(), seedPayload.metadata->clone());
443443
};
444444

445-
auto requests = yarpl::flowable::Flowable<Payload>::create(
446-
[&](auto& subscriber, int64_t num) {
447-
while (num--) {
448-
subscriber.onNext(makePayload());
449-
}
450-
})
451-
->take(3);
445+
auto requests =
446+
yarpl::flowable::Flowable<Payload>::create([&](auto& subscriber,
447+
int64_t num) {
448+
while (num--) {
449+
subscriber.onNext(makePayload());
450+
}
451+
})->take(3);
452452

453453
requester->requestChannel(std::move(requests))
454454
->map([&](Payload p) {

rsocket/test/RequestResponseTest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ class TestHandlerCancel : public rsocket::RSocketResponder {
6666
} else {
6767
// if not cancelled would do work and emit here
6868
}
69-
})
70-
.detach();
69+
}).detach();
7170
});
7271
}
7372

rsocket/transports/tcp/TcpConnectionAcceptor.cpp

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,20 @@ void TcpConnectionAcceptor::start(OnDuplexConnectionAccept onAccept) {
9191

9292
// The AsyncServerSocket needs to be accessed from the listener thread only.
9393
// This will propagate out any exceptions the listener throws.
94-
folly::via(
95-
serverThread_->getEventBase(),
96-
[this] {
97-
serverSocket_->bind(options_.address);
98-
99-
for (auto const& callback : callbacks_) {
100-
serverSocket_->addAcceptCallback(
101-
callback.get(), callback->eventBase());
102-
}
103-
104-
serverSocket_->listen(options_.backlog);
105-
serverSocket_->startAccepting();
106-
107-
for (const auto& i : serverSocket_->getAddresses()) {
108-
VLOG(1) << "Listening on " << i.describe();
109-
}
110-
})
111-
.get();
94+
folly::via(serverThread_->getEventBase(), [this] {
95+
serverSocket_->bind(options_.address);
96+
97+
for (auto const& callback : callbacks_) {
98+
serverSocket_->addAcceptCallback(callback.get(), callback->eventBase());
99+
}
100+
101+
serverSocket_->listen(options_.backlog);
102+
serverSocket_->startAccepting();
103+
104+
for (const auto& i : serverSocket_->getAddresses()) {
105+
VLOG(1) << "Listening on " << i.describe();
106+
}
107+
}).get();
112108
}
113109

114110
void TcpConnectionAcceptor::stop() {

rsocket/transports/tcp/TcpDuplexConnection.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ class TcpReaderWriter : public folly::AsyncTransportWrapper::WriteCallback,
107107
intrusive_ptr_release(this);
108108
}
109109

110-
void writeErr(
111-
size_t,
112-
const folly::AsyncSocketException& exn) noexcept override {
110+
void writeErr(size_t, const folly::AsyncSocketException& exn) noexcept
111+
override {
113112
closeErr(folly::exception_wrapper{std::make_exception_ptr(exn), exn});
114113
intrusive_ptr_release(this);
115114
}

0 commit comments

Comments
 (0)