Skip to content

Commit 25f5267

Browse files
committed
refactor: remove unnecessary function
1 parent b59e827 commit 25f5267

File tree

1 file changed

+3
-5
lines changed
  • src/cargo/core/compiler/context

1 file changed

+3
-5
lines changed

src/cargo/core/compiler/context/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,9 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
348348
pub fn prepare(&mut self) -> CargoResult<()> {
349349
let _p = profile::start("preparing layout");
350350

351-
self.files_mut()
351+
self.files
352+
.as_mut()
353+
.unwrap()
352354
.host
353355
.prepare()
354356
.with_context(|| "couldn't prepare build directories")?;
@@ -375,10 +377,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
375377
self.files.as_ref().unwrap()
376378
}
377379

378-
fn files_mut(&mut self) -> &mut CompilationFiles<'a, 'cfg> {
379-
self.files.as_mut().unwrap()
380-
}
381-
382380
/// Returns the filenames that the given unit will generate.
383381
pub fn outputs(&self, unit: &Unit) -> CargoResult<Arc<Vec<OutputFile>>> {
384382
self.files.as_ref().unwrap().outputs(unit, self.bcx)

0 commit comments

Comments
 (0)