Skip to content

Commit a9fa4de

Browse files
committed
fix some clippy warnings
1 parent fd801ad commit a9fa4de

File tree

5 files changed

+19
-32
lines changed

5 files changed

+19
-32
lines changed

src/profile.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,19 @@ pub fn run_profile(profile: Option<String>, background: RunBackground, launch_ar
145145
info!("Starting Geometry Dash");
146146

147147
let mut child = cmd.spawn().nice_unwrap("Unable to start Geometry Dash");
148-
if background != RunBackground::Background {
149-
child.wait().unwrap();
150-
}
151148

152-
if background == RunBackground::ForegroundStay {
153-
info!("Press any key to exit");
154-
_ = crossterm_input::input().read_char();
149+
match background {
150+
RunBackground::Foreground => {
151+
child.wait().unwrap();
152+
}
153+
154+
RunBackground::ForegroundStay => {
155+
child.wait().unwrap();
156+
info!("Press any key to exit");
157+
_ = crossterm_input::input().read_char();
158+
}
159+
160+
RunBackground::Background => {}
155161
}
156162
}
157163

src/project.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ pub fn check_dependencies(
319319
fatal!("Geometry Dash version not specified for Android, please specify one in mod.json");
320320
}
321321
}
322-
PlatformName::IOS => {
322+
PlatformName::Ios => {
323323
if gd.ios.is_none() {
324324
fatal!("Geometry Dash version not specified for iOS, please specify one in mod.json");
325325
}

src/project_build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub fn build_project(
113113
conf_args.push("-DGEODE_DONT_INSTALL_MODS=1".into());
114114
}
115115
}
116-
PlatformName::IOS => {
116+
PlatformName::Ios => {
117117
if cross_compiling && cfg!(not(target_os = "macos")) {
118118
fatal!("Sorry! but we do not know of any way to cross-compile to iOS when not using MacOS.");
119119
}

src/util/config.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,6 @@ fn default_index_url() -> String {
3939
"https://api.geode-sdk.org".to_string()
4040
}
4141

42-
// old config.json structures for migration
43-
// TODO: remove this in 3.0
44-
#[derive(Serialize, Deserialize, Clone)]
45-
#[serde(rename_all = "kebab-case")]
46-
pub struct OldConfigInstallation {
47-
pub path: PathBuf,
48-
pub executable: String,
49-
}
50-
51-
// TODO: remove this in 3.0
52-
#[derive(Serialize, Deserialize, Clone)]
53-
#[serde(rename_all = "kebab-case")]
54-
pub struct OldConfig {
55-
pub default_installation: usize,
56-
pub working_installation: Option<usize>,
57-
pub installations: Option<Vec<OldConfigInstallation>>,
58-
pub default_developer: Option<String>,
59-
}
60-
6142
pub fn profile_platform_default() -> String {
6243
if cfg!(target_os = "windows") {
6344
"win".to_owned()
@@ -159,7 +140,7 @@ impl Config {
159140
}
160141
}
161142

162-
pub fn get_current_profile(&'_ self) -> Ref<'_, Profile> {
143+
pub fn get_current_profile(&self) -> Ref<'_, Profile> {
163144
self.get_profile(&self.current_profile)
164145
.nice_unwrap("No current profile found!")
165146
.borrow()

src/util/mod_file.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ pub enum PlatformName {
232232
Android,
233233
Android32,
234234
Android64,
235-
IOS,
235+
Ios,
236236
}
237237

238238
impl PlatformName {
@@ -246,7 +246,7 @@ impl PlatformName {
246246
} else if cfg!(target_os = "macos") {
247247
Some(PlatformName::MacOS)
248248
} else if cfg!(target_os = "ios") {
249-
Some(PlatformName::IOS)
249+
Some(PlatformName::Ios)
250250
} else {
251251
None
252252
}
@@ -264,7 +264,7 @@ impl Display for PlatformName {
264264
P::Android => "android",
265265
P::Android32 => "android32",
266266
P::Android64 => "android64",
267-
P::IOS => "ios",
267+
P::Ios => "ios",
268268
})
269269
}
270270
}
@@ -279,7 +279,7 @@ fn all_platforms() -> HashSet<PlatformName> {
279279
P::Android,
280280
P::Android32,
281281
P::Android64,
282-
P::IOS,
282+
P::Ios,
283283
])
284284
}
285285

0 commit comments

Comments
 (0)