mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-28 01:20:32 +00:00
refactor: Use std::move and std::string_view where possible (#7424)
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@@ -133,7 +134,8 @@ public:
|
||||
static void
|
||||
onRequest(Session& session)
|
||||
{
|
||||
session.write(std::string("Hello, world!\n"));
|
||||
using namespace std::string_view_literals;
|
||||
session.write("Hello, world!\n"sv);
|
||||
if (beast::rfc2616::isKeepAlive(session.request()))
|
||||
{
|
||||
session.complete();
|
||||
|
||||
Reference in New Issue
Block a user