Skip to content

Commit fcc161c

Browse files
lint (#143)
1 parent a7ec4ce commit fcc161c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/normalizer.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@
99

1010
// Local
1111
#include <pytorch/tokenizers/normalizer.h>
12-
#include <pytorch/tokenizers/regex.h>
1312

1413
// Third Party
1514
#include <unicode.h>
1615

1716
// Standard
1817
#include <algorithm>
1918
#include <iterator>
20-
#include <memory>
21-
#include <string>
2219
#include <utility>
23-
#include <vector>
2420

2521
// Third Party
2622
#include <nlohmann/json.hpp>
@@ -104,9 +100,8 @@ std::unique_ptr<IRegex> ReplaceNormalizer::create_regex_(
104100
assert(!pattern.empty());
105101
auto regex_result = create_regex(pattern);
106102
if (!regex_result.ok()) {
107-
std::string error =
108-
"Error: " + std::to_string(static_cast<int>(regex_result.error()));
109-
throw std::runtime_error(error);
103+
throw std::runtime_error(
104+
"Error: " + std::to_string(static_cast<int>(regex_result.error())));
110105
}
111106
return std::move(regex_result.get());
112107
}

0 commit comments

Comments
 (0)