From f077d8b6f025892c0b260a83c4949be6d9d6b82d Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 14 May 2024 14:48:12 -0600 Subject: [PATCH] fix: get_filename should not consume self --- sqlx-sqlite/src/options/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlx-sqlite/src/options/mod.rs b/sqlx-sqlite/src/options/mod.rs index ac45b84e35..0815d887b4 100644 --- a/sqlx-sqlite/src/options/mod.rs +++ b/sqlx-sqlite/src/options/mod.rs @@ -212,8 +212,8 @@ impl SqliteConnectOptions { } /// Gets the current name of the database file. - pub fn get_filename(self) -> Cow<'static, Path> { - self.filename + pub fn get_filename(&self) -> &Path { + &self.filename } /// Set the enforcement of [foreign key constraints](https://www.sqlite.org/pragma.html#pragma_foreign_keys).