From 1048b6acb8e8e2a5e676e5724101eaaa970757e9 Mon Sep 17 00:00:00 2001 From: Drew Nutter Date: Thu, 27 Feb 2025 09:56:40 -0500 Subject: [PATCH] refactor(cmd): mv src/cmd/config.zig to src/config.zig (#582) I find it confusing that we have a cmd.zig in the sources root, and then we have a separate cmd folder that has nothing except the application configuration. I don't see why this folder exists if it doesn't contain cmd.zig. Either the folder should contain both cmd.zig and config.zig, or the folder should be eliminated and both go in src. Dividing it in half is just confusing and seems like the worst approach. In this PR I've opted to eliminate the folder. --- src/cmd.zig | 2 +- src/{cmd => }/config.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/{cmd => }/config.zig (99%) diff --git a/src/cmd.zig b/src/cmd.zig index 65e5c8094..6fce8c773 100644 --- a/src/cmd.zig +++ b/src/cmd.zig @@ -2,7 +2,7 @@ const builtin = @import("builtin"); const cli = @import("zig-cli"); const sig = @import("sig.zig"); const std = @import("std"); -const config = @import("cmd/config.zig"); +const config = @import("config.zig"); const AccountsDB = sig.accounts_db.AccountsDB; const FullAndIncrementalManifest = sig.accounts_db.FullAndIncrementalManifest; diff --git a/src/cmd/config.zig b/src/config.zig similarity index 99% rename from src/cmd/config.zig rename to src/config.zig index ba876d75c..72e03362f 100644 --- a/src/cmd/config.zig +++ b/src/config.zig @@ -1,5 +1,5 @@ const std = @import("std"); -const sig = @import("../sig.zig"); +const sig = @import("sig.zig"); const ShredNetworkConfig = sig.shred_network.ShredNetworkConfig; const resolveSocketAddr = sig.net.net.resolveSocketAddr;