remove dead code

This commit is contained in:
Charles Hall 2024-04-29 21:47:19 -07:00
parent c9945f6bba
commit aa51acf152
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
3 changed files with 1 additions and 59 deletions

View file

@ -6,7 +6,6 @@ use crate::{
SERVICES,
};
use abstraction::{KeyValueDatabaseEngine, KvTree};
use directories::ProjectDirs;
use lru_cache::LruCache;
use ruma::{
@ -21,7 +20,7 @@ use ruma::{
};
use std::{
collections::{BTreeMap, HashMap, HashSet},
fs::{self, remove_dir_all},
fs,
io::Write,
mem::size_of,
path::Path,
@ -170,18 +169,6 @@ pub struct KeyValueDatabase {
}
impl KeyValueDatabase {
/// Tries to remove the old database but ignores all errors.
pub fn try_remove(server_name: &str) -> Result<()> {
let mut path = ProjectDirs::from("xyz", "koesters", "conduit")
.ok_or_else(|| Error::bad_config("The OS didn't return a valid home directory path."))?
.data_dir()
.to_path_buf();
path.push(server_name);
let _ = remove_dir_all(path);
Ok(())
}
fn check_db_setup(config: &Config) -> Result<()> {
let path = Path::new(&config.database_path);