Skip to content

Commit

Permalink
CHG: Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
krisvanrens committed Sep 5, 2024
1 parent 829f6c0 commit 193ecce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct Process {

impl Process {
fn calculate(&mut self, input: u64) -> f64 {
*self.cache.get_or_insert_with(&input, |&i| /* ..do expensive calculation on `input`.. */)
*self.cache.get_or_insert_with(&input, |&i| /* ..do calculation on `input`.. */)
}
}
```
Expand All @@ -70,7 +70,7 @@ impl Process {
if let Some(result) = self.cache.get(&input) {
*result // Use cached value.
} else {
let result = /* ..do expensive calculation on `input`.. */;
let result = /* ..do calculation on `input`.. */;
self.cache.insert(input, result);
result
}
Expand Down

0 comments on commit 193ecce

Please sign in to comment.