Skip to content

Commit 20f1b2a

Browse files
committed
Run fmt
1 parent 16f4692 commit 20f1b2a

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/machine.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ use std::num::NonZeroU64;
88
use std::time::Instant;
99

1010
use log::trace;
11+
use measureme::{DetachedTiming, EventId, Profiler, StringId};
1112
use rand::rngs::StdRng;
1213
use rand::SeedableRng;
13-
use measureme::{Profiler, StringId, EventId, DetachedTiming};
1414

1515
use rustc_data_structures::fx::FxHashMap;
1616
use rustc_middle::{
@@ -285,15 +285,13 @@ pub struct Evaluator<'mir, 'tcx> {
285285
}
286286

287287
impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
288-
pub(crate) fn new(
289-
config: &MiriConfig,
290-
layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>,
291-
) -> Self {
288+
pub(crate) fn new(config: &MiriConfig, layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Self {
292289
let layouts =
293290
PrimitiveLayouts::new(layout_cx).expect("Couldn't get layouts of primitive types");
294-
let profiler = config.measureme_out.as_ref().map(|out| {
295-
Profiler::new(out).expect("Couldn't create `measureme` profiler")
296-
});
291+
let profiler = config
292+
.measureme_out
293+
.as_ref()
294+
.map(|out| Profiler::new(out).expect("Couldn't create `measureme` profiler"));
297295
Evaluator {
298296
// `env_vars` could be initialized properly here if `Memory` were available before
299297
// calling this method.
@@ -617,9 +615,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
617615
let timing = if let Some(profiler) = ecx.machine.profiler.as_ref() {
618616
let fn_name = frame.instance.to_string();
619617
let entry = ecx.machine.string_cache.entry(fn_name.clone());
620-
let name = entry.or_insert_with(|| {
621-
profiler.alloc_string(&*fn_name)
622-
});
618+
let name = entry.or_insert_with(|| profiler.alloc_string(&*fn_name));
623619

624620
Some(profiler.start_recording_interval_event_detached(
625621
*name,

0 commit comments

Comments
 (0)