fix some compiler issues

This commit is contained in:
Hocuri
2022-05-05 12:13:05 +02:00
committed by Septias
parent b20f03775a
commit c6369ce691
3 changed files with 16 additions and 4 deletions

View File

@@ -593,6 +593,12 @@ impl Sql {
}
pub async fn get_raw_config_bool(&self, key: &str) -> Result<bool> {
self.get_raw_config(key)
.await
.map(|s| s.and_then(|s| s.parse().ok()))
}
pub async fn get_raw_config_bool(&self, key: impl AsRef<str>) -> Result<bool> {
// Not the most obvious way to encode bool as string, but it is matter
// of backward compatibility.
let res = self.get_raw_config_int(key).await?;