linted the code.
This commit is contained in:
1 parent
0c171171c2
commit
f4170610b0
12 files changed
+84
-57
No files matched your search
+4
-4
@@ -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(),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user