Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(recording): remove needless return in memory profiling leak check

Richie McIlroyf4d41bc8aedd
diff --git a/crates/recording/src/memory_profiling.rs b/crates/recording/src/memory_profiling.rs
index 60892fab7..430c1a74a 100644
--- a/crates/recording/src/memory_profiling.rs
+++ b/crates/recording/src/memory_profiling.rs
@@ -58,7 +58,7 @@ impl MemoryProfiler {
#[cfg(feature = "memory-profiling")]
{
let stats = dhat::HeapStats::get();
- return LeakCheckResult {
+ LeakCheckResult {
growth_rate_mb_per_sec: growth.rate_mb_per_sec,
total_growth_mb: growth.total_mb,
peak_mb: growth.peak_mb,
@@ -66,7 +66,7 @@ impl MemoryProfiler {
dhat_current_bytes: Some(stats.curr_bytes as u64),
dhat_peak_bytes: Some(stats.max_bytes as u64),
verdict: classify_leak(growth.rate_mb_per_sec),
- };
+ }
}
#[cfg(not(feature = "memory-profiling"))]