fix: get_filename should not consume self (#3233)

This commit is contained in:
Jason Ish 2024-05-17 19:57:49 -06:00 committed by GitHub
parent 60d033eda2
commit e7f71900f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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).