blob: 42f1809ce3fa73158e94a02a1080bbeec5075bc7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
pub mod sqlite;
use miette::Result;
pub enum Context {
SQLite(sqlite::SQLite),
}
impl Default for Context {
fn default() -> Self {
Context::SQLite(sqlite::SQLite::default())
}
}
pub trait Store {
fn init(&mut self) -> Result<()>;
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn context_default() {
let context = Context::default();
let res = match context {
Context::SQLite(_) => true,
};
assert!(res);
}
}
|