]> git.lizzy.rs Git - rust.git/commitdiff
Run fmt
authorAaron Hill <aa1ronham@gmail.com>
Sat, 29 May 2021 22:16:12 +0000 (17:16 -0500)
committerAaron Hill <aa1ronham@gmail.com>
Sat, 29 May 2021 22:16:12 +0000 (17:16 -0500)
src/machine.rs

index 4ed2fba43c1420f4bd7dc7175bafd9d4f78be1a1..1a01ece6c9a8df5480f0dce7a1887df09b18c005 100644 (file)
@@ -8,9 +8,9 @@
 use std::time::Instant;
 
 use log::trace;
+use measureme::{DetachedTiming, EventId, Profiler, StringId};
 use rand::rngs::StdRng;
 use rand::SeedableRng;
-use measureme::{Profiler, StringId, EventId, DetachedTiming};
 
 use rustc_data_structures::fx::FxHashMap;
 use rustc_middle::{
@@ -285,15 +285,13 @@ pub struct Evaluator<'mir, 'tcx> {
 }
 
 impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
-    pub(crate) fn new(
-        config: &MiriConfig,
-        layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>,
-    ) -> Self {
+    pub(crate) fn new(config: &MiriConfig, layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Self {
         let layouts =
             PrimitiveLayouts::new(layout_cx).expect("Couldn't get layouts of primitive types");
-        let profiler = config.measureme_out.as_ref().map(|out| {
-            Profiler::new(out).expect("Couldn't create `measureme` profiler")
-        });
+        let profiler = config
+            .measureme_out
+            .as_ref()
+            .map(|out| Profiler::new(out).expect("Couldn't create `measureme` profiler"));
         Evaluator {
             // `env_vars` could be initialized properly here if `Memory` were available before
             // calling this method.
@@ -617,9 +615,7 @@ fn init_frame_extra(
         let timing = if let Some(profiler) = ecx.machine.profiler.as_ref() {
             let fn_name = frame.instance.to_string();
             let entry = ecx.machine.string_cache.entry(fn_name.clone());
-            let name = entry.or_insert_with(|| {
-                profiler.alloc_string(&*fn_name)
-            });
+            let name = entry.or_insert_with(|| profiler.alloc_string(&*fn_name));
 
             Some(profiler.start_recording_interval_event_detached(
                 *name,