Skip to content

Commit 20d4cff

Browse files
clang format
1 parent da0b08c commit 20d4cff

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/cli/start.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ will not work, because it starts a new interactive shell.)",
112112
e.second.mount_path));
113113
// sub-images
114114
for (auto [sqfs, mnt] : e.second.sub_images) {
115-
commands.push_back(fmt::format("{}:{}", sqfs.string(), mnt.string()));
115+
commands.push_back(
116+
fmt::format("{}:{}", sqfs.string(), mnt.string()));
116117
}
117118
}
118119

src/uenv/modular_env.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#include "modular_env.hpp"
2-
#include <tuple>
3-
#include <util/expected.h>
42
#include <exception>
53
#include <fstream>
64
#include <nlohmann/json.hpp>
5+
#include <tuple>
76
#include <uenv/repository.h>
7+
#include <util/expected.h>
88

99
namespace uenv {
1010

1111
util::expected<modular_env_paths, std::string>
1212
read_modular_env(const std::filesystem::path& modular_uenv_json_path,
13-
std::optional<std::filesystem::path> repo_arg) {
13+
std::optional<std::filesystem::path> repo_arg) {
1414

1515
using json = nlohmann::json;
1616
std::ifstream f(modular_uenv_json_path.c_str());
@@ -50,17 +50,16 @@ read_modular_env(const std::filesystem::path& modular_uenv_json_path,
5050
}
5151

5252
if (data.contains("compilers")) {
53-
for(auto entry: data["compilers"]) {
54-
auto mount = entry["image"]["prefix_path"];
55-
auto sqfs = entry["image"]["file"];
56-
sub_images.push_back(std::make_tuple(sqfs,mount));
57-
}
53+
for (auto entry : data["compilers"]) {
54+
auto mount = entry["image"]["prefix_path"];
55+
auto sqfs = entry["image"]["file"];
56+
sub_images.push_back(std::make_tuple(sqfs, mount));
57+
}
5858
}
5959

60-
return modular_env_paths{
61-
.sqfs_path = sqfs_path,
62-
.mount_path = mount_path,
63-
.sub_images = sub_images};
60+
return modular_env_paths{.sqfs_path = sqfs_path,
61+
.mount_path = mount_path,
62+
.sub_images = sub_images};
6463
}
6564

6665
} // namespace uenv

src/uenv/modular_env.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
#pragma once
22

3-
#include <optional>
3+
#include "uenv/uenv.h"
44
#include <filesystem>
5+
#include <optional>
56
#include <util/expected.h>
6-
#include "uenv/uenv.h"
77

88
namespace uenv {
99

10-
1110
struct modular_env_paths {
12-
std::filesystem::path sqfs_path;
13-
std::filesystem::path mount_path;
14-
std::vector<std::tuple<std::filesystem::path, std::filesystem::path>> sub_images;
11+
std::filesystem::path sqfs_path;
12+
std::filesystem::path mount_path;
13+
std::vector<std::tuple<std::filesystem::path, std::filesystem::path>>
14+
sub_images;
1515
};
1616

1717
util::expected<modular_env_paths, std::string>

0 commit comments

Comments
 (0)