You've already forked AstralRinth
forked from didirus/AstralRinth
box::pin in run(),clippy (#115)
This commit is contained in:
@@ -391,6 +391,7 @@ pub async fn remove_project(
|
|||||||
/// failing with an error if no credentials are available
|
/// failing with an error if no credentials are available
|
||||||
#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn run(path: &Path) -> crate::Result<Arc<RwLock<MinecraftChild>>> {
|
pub async fn run(path: &Path) -> crate::Result<Arc<RwLock<MinecraftChild>>> {
|
||||||
|
Box::pin(async move {
|
||||||
let state = State::get().await?;
|
let state = State::get().await?;
|
||||||
|
|
||||||
// Get default account and refresh credentials (preferred way to log in)
|
// Get default account and refresh credentials (preferred way to log in)
|
||||||
@@ -408,6 +409,8 @@ pub async fn run(path: &Path) -> crate::Result<Arc<RwLock<MinecraftChild>>> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
run_credentials(path, &credentials).await
|
run_credentials(path, &credentials).await
|
||||||
|
})
|
||||||
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run Minecraft using a profile, and credentials for authentication
|
/// Run Minecraft using a profile, and credentials for authentication
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ pub async fn profile_edit(
|
|||||||
path: &Path,
|
path: &Path,
|
||||||
edit_profile: EditProfile,
|
edit_profile: EditProfile,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
profile::edit(&path, |prof| {
|
profile::edit(path, |prof| {
|
||||||
if let Some(metadata) = edit_profile.metadata.clone() {
|
if let Some(metadata) = edit_profile.metadata.clone() {
|
||||||
if let Some(name) = metadata.name {
|
if let Some(name) = metadata.name {
|
||||||
prof.metadata.name = name
|
prof.metadata.name = name
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
use dunce::canonicalize;
|
use dunce::canonicalize;
|
||||||
use theseus::jre::autodetect_java_globals;
|
use theseus::jre::autodetect_java_globals;
|
||||||
use theseus::prelude::*;
|
use theseus::prelude::*;
|
||||||
use theseus::profile::install;
|
|
||||||
use theseus::profile_create::profile_create;
|
|
||||||
|
|
||||||
use tokio::time::{sleep, Duration};
|
use tokio::time::{sleep, Duration};
|
||||||
use tracing_error::ErrorLayer;
|
use tracing_error::ErrorLayer;
|
||||||
|
|||||||
Reference in New Issue
Block a user