Skip to content

Commit 04f048d

Browse files
authored
feat: set default config as oma-debian.toml if without aosc feature (#102)
1 parent c08390a commit 04f048d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/config.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ use anyhow::Result;
55
use serde::{Deserialize, Serialize};
66
use tracing::warn;
77

8+
#[cfg(feature = "aosc")]
89
const DEFAULT_CONFIG: &str = include_str!("../data/config/oma.toml");
910

11+
#[cfg(not(feature = "aosc"))]
12+
const DEFAULT_CONFIG: &str = include_str!("../data/config/oma-debian.toml");
13+
1014
#[derive(Debug, Deserialize, Serialize)]
1115
pub struct Config {
1216
pub general: Option<GeneralConfig>,
@@ -63,7 +67,11 @@ impl GeneralConfig {
6367
}
6468

6569
pub fn default_search_engine() -> String {
66-
String::from("indicium")
70+
if cfg!(feature = "aosc") {
71+
String::from("indicium")
72+
} else {
73+
String::from("strsim")
74+
}
6775
}
6876
}
6977

0 commit comments

Comments
 (0)