diff options
| author | Daniel Hader <[email protected]> | 2026-05-11 19:28:00 -0500 |
|---|---|---|
| committer | Daniel Hader <[email protected]> | 2026-05-11 19:28:00 -0500 |
| commit | 36fad793c3be58b220ae319a45c8cd8afbae09fa (patch) | |
| tree | 0f072c9f3dd45b4295ded00d8a7f2c318238b688 /src/database/problem.rs | |
| parent | a005add5513182abb0b1230cf514c7a45b290e4b (diff) | |
user route and database pooling using r2d2
Diffstat (limited to 'src/database/problem.rs')
| -rw-r--r-- | src/database/problem.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database/problem.rs b/src/database/problem.rs index fdbb2b5..c3e04c2 100644 --- a/src/database/problem.rs +++ b/src/database/problem.rs @@ -5,10 +5,11 @@ pub struct Problem { } impl Problem { - pub fn new(id: i64, title: String, description: String) -> Self { + pub(super) fn new(id: i64, title: String, description: String) -> Self { Self { id, title, description } } + pub fn id(&self) -> i64 { self.id } pub fn title(&self) -> &str { &self.title } pub fn description(&self) -> &str { &self.description } } |
