diff --git a/src/Algos.cc b/src/Algos.cc index 13d756df2..164c2a4eb 100644 --- a/src/Algos.cc +++ b/src/Algos.cc @@ -179,7 +179,7 @@ findSimilarStr( #ifdef POAC_TEST -# include "Rustify/Aliases.hpp" +# include "Rustify/Common.hpp" # include "Rustify/Tests.hpp" # include diff --git a/src/Cli.hpp b/src/Cli.hpp index 60e5a3ee4..e6f445a25 100644 --- a/src/Cli.hpp +++ b/src/Cli.hpp @@ -1,7 +1,7 @@ #pragma once #include "Logger.hpp" -#include "Rustify/Aliases.hpp" +#include "Rustify/Common.hpp" #include #include diff --git a/src/Manifest.hpp b/src/Manifest.hpp index 0de4330ad..5ec720651 100644 --- a/src/Manifest.hpp +++ b/src/Manifest.hpp @@ -1,6 +1,6 @@ #pragma once -#include "Rustify/Aliases.hpp" +#include "Rustify/Common.hpp" #include "Semver.hpp" #include diff --git a/src/Rustify.hpp b/src/Rustify.hpp index 49e1df782..f0dad6b53 100644 --- a/src/Rustify.hpp +++ b/src/Rustify.hpp @@ -1,5 +1,5 @@ #pragma once -#include "Rustify/Aliases.hpp" +#include "Rustify/Common.hpp" #include "Rustify/Tests.hpp" #include "Rustify/Traits.hpp" diff --git a/src/Rustify/Aliases.hpp b/src/Rustify/Common.hpp similarity index 82% rename from src/Rustify/Aliases.hpp rename to src/Rustify/Common.hpp index 5f0f72167..fd759f7fb 100644 --- a/src/Rustify/Aliases.hpp +++ b/src/Rustify/Common.hpp @@ -2,8 +2,8 @@ #include #include +#include #include -#include #include #include @@ -24,10 +24,9 @@ panic( const std::string_view msg, const std::source_location& loc = std::source_location::current() ) { - std::ostringstream oss; - oss << "panicked at '" << msg << "', " << loc.file_name() << ':' << loc.line() - << '\n'; - throw std::logic_error(oss.str()); + throw std::logic_error( + fmt::format("panicked at '{}', {}:{}\n", msg, loc.file_name(), loc.line()) + ); } [[noreturn]] inline void diff --git a/src/VersionReq.cc b/src/VersionReq.cc index 5b95d0904..7c04374d9 100644 --- a/src/VersionReq.cc +++ b/src/VersionReq.cc @@ -1,7 +1,7 @@ #include "VersionReq.hpp" #include "Exception.hpp" -#include "Rustify/Aliases.hpp" +#include "Rustify/Common.hpp" #include #include