summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-07-01 22:30:12 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-07-01 22:30:12 -0400
commit356f6ea91cf655801f7e910ccdf46b3d0b6d571c (patch)
tree576e480bc6b55dcec84ad4b7a1ea31b852bc8779
parentc93f8073249a9c98e712faf33c306734ca1e7fb4 (diff)
Improve consistency
-rw-r--r--content/code/entities-as-dependencies.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/code/entities-as-dependencies.md b/content/code/entities-as-dependencies.md
index 95bec71..874080b 100644
--- a/content/code/entities-as-dependencies.md
+++ b/content/code/entities-as-dependencies.md
@@ -13,7 +13,7 @@ Recently I've found myself trying to address a collection of needs related to da
The external world references entities by key, not by value, for fairly boring practical reasons. Data access code frequently needs to deal with records that contain those keys, but also deal with underlying data stores that will enforce constraints on the values those keys can have.
```rust
-pub fn create_message(&mut self, username: String, body: String) -> Result<Message>
+pub fn create(&mut self, username: String, body: String) -> Result<Message>
```
The example above is the signature (in Rust) for a hypothetical database accessor function that writes a new row to a table containing two columns. If the `user` column must reference a row in the `user` table by ID, then this function has a constraint: it must be called with a "valid" `user`, or it will return an error.