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
This commit is contained in:
klensy 2024-01-14 14:50:19 +03:00
parent 59d3717159
commit 573b6522f9
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ fn find_chapter(
} }
} }
previous = Some(item.clone()); previous = Some(item);
} }
_ => continue, _ => continue,
} }