Skip to content

Commit 81036cc

Browse files
committed
API: Small code changes
1 parent 81eb94e commit 81036cc

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

portablemc/src/base/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub(crate) const LEGACY_JVM_ARGS: &[&str] = &[
5555
/// no feature by default and provides no fixes for legacy things. This installer just
5656
/// implements the basics of how Minecraft versions are specified, this is mostly from
5757
/// reverse engineering. **Most of the time, you don't want to use this directly, instead
58-
/// you can use the [`mojang::Installer`](crate::mojang::Installer), that provides support
58+
/// you can use the [`moj::Installer`](crate::moj::Installer), that provides support
5959
/// for fetching missing Mojang versions, various fixes and authentication support.**
6060
#[derive(Debug, Clone)]
6161
pub struct Installer {
@@ -1731,7 +1731,7 @@ pub enum Event<'a> {
17311731
/// The given version hierarchy has been successfully loaded.
17321732
LoadedHierarchy { hierarchy: &'a [LoadedVersion] },
17331733
/// A version will be loaded, at this point you can check the file for its
1734-
/// validity, and delete it if relevant, in this case [`Self::need_version`]
1734+
/// validity, and delete it if relevant, in this case [`Self::NeedVersion`]
17351735
/// is called just after to possibly install the version metadata.
17361736
LoadVersion { version: &'a str, file: &'a Path },
17371737
/// This event is called if the given version is missing a metadata file, in this
@@ -1885,7 +1885,7 @@ pub enum Error {
18851885
},
18861886
#[error("main class not found")]
18871887
MainClassNotFound { },
1888-
/// Returned if the [`Handler::download_resources`] returned false, the installation
1888+
/// Returned if the [`Event::DownloadResources`] returned false, the installation
18891889
/// procedure can't continue because it needs resources to be downloaded.
18901890
#[error("download resources cancelled")]
18911891
DownloadResourcesCancelled { },

portablemc/tests/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn check(version: &str) {
5757
.suffix(".event")
5858
.tempdir_in(env!("CARGO_TARGET_TMPDIR"))
5959
.unwrap()
60-
.into_path();
60+
.keep();
6161

6262
let tmp_versions_dir = tmp_main_dir.join("versions");
6363
let tmp_version_dir = tmp_versions_dir.join(version);

portablemc/tests/mojang.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn all() {
1919
.suffix(".all")
2020
.tempdir_in(env!("CARGO_TARGET_TMPDIR"))
2121
.unwrap()
22-
.into_path();
22+
.keep();
2323

2424
let mut inst = moj::Installer::new(moj::Version::Release);
2525
inst.base_mut().set_main_dir(tmp_main_dir.clone());

0 commit comments

Comments
 (0)