@@ -211,7 +211,7 @@ impl<'v, 'a> Evaluator<'v, 'a> {
211211 /// Enable profiling, allowing [`Evaluator::write_profile`] to be used.
212212 /// Profilers add overhead, and while some profilers can be used together,
213213 /// it's better to run at most one profiler at a time.
214- pub fn enable_profile ( & mut self , mode : & ProfileMode ) {
214+ pub fn enable_profile ( & mut self , mode : & ProfileMode ) -> anyhow :: Result < ( ) > {
215215 match mode {
216216 ProfileMode :: HeapSummary
217217 | ProfileMode :: HeapFlame
@@ -247,13 +247,14 @@ impl<'v, 'a> Evaluator<'v, 'a> {
247247 self . typecheck_profile . enabled = true ;
248248 }
249249 }
250+ Ok ( ( ) )
250251 }
251252
252253 /// Enable instrumentation in module which is loaded by a module to be profiled.
253254 ///
254255 /// This function need to be called when evaluating a dependency of a module, if a module
255256 /// does profiling in the given mode.
256- pub fn enable_profile_instrumentation ( & mut self , mode : & ProfileMode ) {
257+ pub fn enable_profile_instrumentation ( & mut self , mode : & ProfileMode ) -> anyhow :: Result < ( ) > {
257258 match mode {
258259 ProfileMode :: Bytecode | ProfileMode :: BytecodePairs => {
259260 self . bc_profile . enable_1 ( ) ;
@@ -270,6 +271,7 @@ impl<'v, 'a> Evaluator<'v, 'a> {
270271 }
271272 ProfileMode :: Typecheck => { }
272273 }
274+ Ok ( ( ) )
273275 }
274276
275277 /// Write a profile to a file.
0 commit comments