fix
Some checks failed
linux-x64-gcc / linux-gcc (Release) (push) Failing after 3m2s
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 4m26s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 4m46s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 5m37s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 5m42s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 6m23s

This commit is contained in:
tqcq 2024-05-31 10:15:01 +08:00
parent 00788da459
commit 5888266152
3 changed files with 23 additions and 18 deletions

View File

@ -12,7 +12,7 @@
#include <assert.h> #include <assert.h>
// clang-format off // clang-format off
#include <fmt/ostream.h>// support fmt base ostream #include <fmt/ostream.h>// support fmt base ostream
#include <fmt/time.h> // #include <fmt/time.h>
namespace { namespace {

View File

@ -107,7 +107,7 @@
#include "sled/uri.h" #include "sled/uri.h"
// testing // testing
#include "sled/testing/test.h" // #include "sled/testing/test.h"
// debugging // debugging

View File

@ -8,6 +8,7 @@
#ifndef SLED_STATUS_H #ifndef SLED_STATUS_H
#define SLED_STATUS_H #define SLED_STATUS_H
#include "fmt/ostream.h"
#include <memory> #include <memory>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
@ -15,23 +16,23 @@
namespace sled { namespace sled {
enum class StatusCode { enum class StatusCode {
kOk = 0, kOk = 0,
kCancelled = 1, kCancelled = 1,
kUnknown = 2, kUnknown = 2,
kInvalidArgument = 3, kInvalidArgument = 3,
kDeadlineExceeded = 4, kDeadlineExceeded = 4,
kNotFound = 5, kNotFound = 5,
kAlreadyExists = 6, kAlreadyExists = 6,
kPermissionDenied = 7, kPermissionDenied = 7,
kResourceExhausted = 8, kResourceExhausted = 8,
kFailedPrecondition = 9, kFailedPrecondition = 9,
kAborted = 10, kAborted = 10,
kOutOfRange = 11, kOutOfRange = 11,
kUnimplemented = 12, kUnimplemented = 12,
kInternal = 13, kInternal = 13,
kUnavailable = 14, kUnavailable = 14,
kDataLoss = 15, kDataLoss = 15,
kUnauthenticated = 16, kUnauthenticated = 16,
}; };
std::string StatusCodeToString(StatusCode code); std::string StatusCodeToString(StatusCode code);
@ -102,4 +103,8 @@ std::ostream &operator<<(std::ostream &os, sled::Status const &status);
}// namespace sled }// namespace sled
namespace fmt {
template<>
struct formatter<::sled::Status> : ostream_formatter {};
}// namespace fmt
#endif// SLED_STATUS_H #endif// SLED_STATUS_H