diff options
Diffstat (limited to 'src/launcher')
| -rw-r--r-- | src/launcher/assets.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/launcher/assets.rs b/src/launcher/assets.rs index 7d883d8..7ad368e 100644 --- a/src/launcher/assets.rs +++ b/src/launcher/assets.rs @@ -4,7 +4,7 @@ use std::fmt::{Display, Formatter}; use std::io::ErrorKind;
use std::path::{Path, PathBuf};
use std::path::Component::Normal;
-use futures::{stream, TryFutureExt, TryStreamExt};
+use futures::TryStreamExt;
use log::{debug, info, warn};
use sha1_smol::Sha1;
use tokio::{fs, io};
@@ -184,10 +184,6 @@ impl AssetRepository { format!("{}{:02x}/{}", super::constants::URL_RESOURCE_BASE, obj.hash.bytes()[0], obj.hash)
}
- async fn download_assets(&self, index: &AssetIndex) -> Result<(), AssetError> {
- todo!()
- }
-
async fn ensure_dir(path: impl AsRef<Path>) -> Result<(), io::Error> {
match fs::create_dir(path).await {
Ok(_) => Ok(()),
@@ -198,7 +194,7 @@ impl AssetRepository { pub async fn ensure_assets(&self, index: &AssetIndex) -> Result<(), AssetError> {
let mut downloads = Vec::new();
- let objects_path = [self.home.as_ref(), OsStr::new("objects")].iter().collect::<PathBuf>();
+ let objects_path = [self.home.as_ref(), OsStr::new(OBJECT_PATH)].iter().collect::<PathBuf>();
Self::ensure_dir(&objects_path).await.map_err(|e| AssetError::IO {
what: "creating objects directory",
|
