blob: 02d03bc56531e8a0e523821c29f5f72b39987cf8 (
plain)
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
|
pub struct Config {
pub api_key: Option<String>,
pub limit: u16,
pub site: String,
}
/// Get project directory; might panic on unexpected OS
pub fn project_dir() -> ProjectDirs {
ProjectDirs::from("io", "Sam Tay", "so").expect(
"Couldn't find
a suitable project directory to store cache and configuration; this
application may not be supported on your operating system.",
)
}
#[cfg(test)]
mod tests {
// TODO test malformed filter string
// TODO test malformed api key
// for both, detect situation and print helpful error message
#[test]
fn test_merge_configs() {
assert!(true)
}
}
|