From 36fad793c3be58b220ae319a45c8cd8afbae09fa Mon Sep 17 00:00:00 2001 From: Daniel Hader Date: Mon, 11 May 2026 19:28:00 -0500 Subject: user route and database pooling using r2d2 --- src/database/problem.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/database/problem.rs') 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 } } -- cgit v1.2.3