Skip to content

Commit 0a32bc4

Browse files
stepanchegfacebook-github-bot
authored andcommitted
&mut self in Evaluator::gen_profile
Summary: Following diff D38646592 modifies `Evaluator` state in `gen_profile`. Reviewed By: bobyangyf Differential Revision: D38646593 fbshipit-source-id: 1f88ab20164b6b8df0b6b0b4a53712b2946a2d55
1 parent 4475145 commit 0a32bc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

starlark/src/eval/runtime/evaluator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,13 @@ impl<'v, 'a> Evaluator<'v, 'a> {
299299

300300
/// Write a profile to a file.
301301
/// Only valid if corresponding profiler was enabled.
302-
pub fn write_profile<P: AsRef<Path>>(&self, filename: P) -> anyhow::Result<()> {
302+
pub fn write_profile<P: AsRef<Path>>(&mut self, filename: P) -> anyhow::Result<()> {
303303
self.gen_profile()?.write(filename.as_ref())
304304
}
305305

306306
/// Generate profile for a given mode.
307307
/// Only valid if corresponding profiler was enabled.
308-
pub fn gen_profile(&self) -> anyhow::Result<ProfileData> {
308+
pub fn gen_profile(&mut self) -> anyhow::Result<ProfileData> {
309309
let mode = match &self.profile_or_instrumentation_mode {
310310
ProfileOrInstrumentationMode::None => {
311311
return Err(EvaluatorError::ProfilingNotEnabled.into());

0 commit comments

Comments
 (0)