@@ -147,35 +147,13 @@ impl Config {
147147 pub fn parse ( ) -> anyhow:: Result < Self > {
148148 let ConfigParser {
149149 workspace,
150- execution_root,
151- output_base,
152150 bazel,
153151 bazelrc,
154152 rust_analyzer_argument,
155153 } = ConfigParser :: parse ( ) ;
156154
157- // Implemented this way instead of a classic `if let` to satisfy the
158- // borrow checker.
159- // See: <https://github.com/rust-lang/rust/issues/54663>
160- #[ allow( clippy:: unnecessary_unwrap) ]
161- if workspace. is_some ( ) && execution_root. is_some ( ) && output_base. is_some ( ) {
162- return Ok ( Config {
163- workspace : workspace. unwrap ( ) ,
164- execution_root : execution_root. unwrap ( ) ,
165- output_base : output_base. unwrap ( ) ,
166- bazel,
167- bazelrc,
168- rust_analyzer_argument,
169- } ) ;
170- }
171-
172155 // We need some info from `bazel info`. Fetch it now.
173- let mut info_map = get_bazel_info (
174- & bazel,
175- workspace. as_deref ( ) ,
176- output_base. as_deref ( ) ,
177- bazelrc. as_deref ( ) ,
178- ) ?;
156+ let mut info_map = get_bazel_info ( & bazel, workspace. as_deref ( ) , None , bazelrc. as_deref ( ) ) ?;
179157
180158 let config = Config {
181159 workspace : info_map
@@ -205,14 +183,6 @@ struct ConfigParser {
205183 #[ clap( long, env = "BUILD_WORKSPACE_DIRECTORY" ) ]
206184 workspace : Option < Utf8PathBuf > ,
207185
208- /// The path to the Bazel execution root. If not specified, uses the result of `bazel info execution_root`.
209- #[ clap( long) ]
210- execution_root : Option < Utf8PathBuf > ,
211-
212- /// The path to the Bazel output user root. If not specified, uses the result of `bazel info output_base`.
213- #[ clap( long, env = "OUTPUT_BASE" ) ]
214- output_base : Option < Utf8PathBuf > ,
215-
216186 /// The path to a Bazel binary.
217187 #[ clap( long, default_value = "bazel" ) ]
218188 bazel : Utf8PathBuf ,
0 commit comments