diff --git a/.rustfmt.toml b/.rustfmt.toml index c3e12fb45..fa144c827 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,4 +1,3 @@ -ignore = ["nativelink-proto/genproto/lib.rs"] max_width = 120 reorder_imports = true imports_granularity = "Module" diff --git a/nativelink-proto/gen_lib_rs_tool.py b/nativelink-proto/gen_lib_rs_tool.py index b02d58cf5..6b7b30b2e 100644 --- a/nativelink-proto/gen_lib_rs_tool.py +++ b/nativelink-proto/gen_lib_rs_tool.py @@ -40,7 +40,7 @@ def print_package_part_to_mod(tree, indents = 0): - tabs = " " * indents + tabs = " " * indents if tree["filename"] is not None: print('%sinclude!("%s");' % (tabs, tree["filename"])) @@ -59,7 +59,7 @@ def main(): help='pb.rs files used to generate lib.rs') args = parser.parse_args() print(_HEADER) - print("") + tree_root = { "children": {}, "filename": None } for filepath in args.files: filepath = os.path.relpath(os.path.normpath(filepath), args.rootdir) @@ -76,7 +76,6 @@ def main(): cur_node["filename"] = '.'.join(package_parts) + '.pb.rs' print_package_part_to_mod(tree_root) - print("") if __name__ == "__main__": diff --git a/nativelink-proto/genproto/lib.rs b/nativelink-proto/genproto/lib.rs index 3a1d95d25..f785df7bf 100644 --- a/nativelink-proto/genproto/lib.rs +++ b/nativelink-proto/genproto/lib.rs @@ -16,44 +16,42 @@ // This file is auto-generated. To update it, run: // `bazel run proto:update_protos` - pub mod build { - pub mod bazel { - pub mod remote { - pub mod execution { - pub mod v2 { - include!("build.bazel.remote.execution.v2.pb.rs"); + pub mod bazel { + pub mod remote { + pub mod execution { + pub mod v2 { + include!("build.bazel.remote.execution.v2.pb.rs"); + } + } + } + pub mod semver { + include!("build.bazel.semver.pb.rs"); } - } - } - pub mod semver { - include!("build.bazel.semver.pb.rs"); } - } } pub mod com { - pub mod github { - pub mod trace_machina { - pub mod nativelink { - pub mod remote_execution { - include!("com.github.trace_machina.nativelink.remote_execution.pb.rs"); + pub mod github { + pub mod trace_machina { + pub mod nativelink { + pub mod remote_execution { + include!("com.github.trace_machina.nativelink.remote_execution.pb.rs"); + } + } } - } } - } } pub mod google { - pub mod api { - include!("google.api.pb.rs"); - } - pub mod bytestream { - include!("google.bytestream.pb.rs"); - } - pub mod longrunning { - include!("google.longrunning.pb.rs"); - } - pub mod rpc { - include!("google.rpc.pb.rs"); - } + pub mod api { + include!("google.api.pb.rs"); + } + pub mod bytestream { + include!("google.bytestream.pb.rs"); + } + pub mod longrunning { + include!("google.longrunning.pb.rs"); + } + pub mod rpc { + include!("google.rpc.pb.rs"); + } } -