linted the code.

This commit is contained in:
didier amyot committed 2023-02-25 22:10:18 -05:00
1 parent 0c171171c2
commit f4170610b0
12 files changed
+84 -57

No files matched your search

+4 -4
View File
@@ -64,25 +64,25 @@ pub struct SQLiteConnectionFactory {
impl SQLiteConnectionFactory {
pub fn new(path: PathBuf) -> SQLiteConnectionFactory {
SQLiteConnectionFactory {
creator: SQLiteConnectionCreator::Path(PathSQLiteConnectionCreator { path })
creator: SQLiteConnectionCreator::Path(PathSQLiteConnectionCreator { path }),
}
}
pub fn inMemory() -> SQLiteConnectionFactory {
SQLiteConnectionFactory {
creator: SQLiteConnectionCreator::Ephemeral(EphemeralSQLiteConnectionCreator {})
creator: SQLiteConnectionCreator::Ephemeral(EphemeralSQLiteConnectionCreator {}),
}
}
pub fn connection(&self) -> CustomResult<Connection> {
match & self.creator {
match &self.creator {
SQLiteConnectionCreator::Path(c) => c.connection(),
SQLiteConnectionCreator::Ephemeral(c) => c.connection(),
}
}
pub fn readonly(&self) -> CustomResult<Connection> {
match & self.creator {
match &self.creator {
SQLiteConnectionCreator::Path(c) => c.readonly(),
SQLiteConnectionCreator::Ephemeral(c) => c.readonly(),
}