From 573b6522f9eb101cee93989ac3788a73e1e62c5d Mon Sep 17 00:00:00 2001 From: klensy Date: Sun, 14 Jan 2024 14:50:19 +0300 Subject: [PATCH] remove useless alloc on rust reference book this reduces total allocs from 490mb to 474mb: ==23272== Total: 490,538,699 bytes in 1,760,117 blocks ==23272== At t-gmax: 13,872,954 bytes in 4,655 blocks ==23272== At t-end: 488,516 bytes in 884 blocks ==23272== Reads: 830,509,060 bytes ==23272== Writes: 522,290,614 bytes to ==40876== Total: 474,156,323 bytes in 1,521,025 blocks ==40876== At t-gmax: 13,872,954 bytes in 4,655 blocks ==40876== At t-end: 488,516 bytes in 884 blocks ==40876== Reads: 820,933,434 bytes ==40876== Writes: 514,838,350 bytes --- src/renderer/html_handlebars/helpers/navigation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/html_handlebars/helpers/navigation.rs b/src/renderer/html_handlebars/helpers/navigation.rs index 86b240ba..12c69027 100644 --- a/src/renderer/html_handlebars/helpers/navigation.rs +++ b/src/renderer/html_handlebars/helpers/navigation.rs @@ -103,7 +103,7 @@ fn find_chapter( } } - previous = Some(item.clone()); + previous = Some(item); } _ => continue, }