Skip to content

Commit 1914fa6

Browse files
committed
update to stable even if on specific version
1 parent dff7f55 commit 1914fa6

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "geode"
3-
version = "2.6.1"
3+
version = "2.6.0"
44
authors = ["HJfod <[email protected]>", "Camila314 <[email protected]>", "matcool", "ConfiG <[email protected]>"]
55
edition = "2021"
66
build = "build.rs"

src/sdk.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -272,23 +272,22 @@ fn install(config: &mut Config, path: PathBuf, force: bool) {
272272

273273
fn update(config: &mut Config, branch: Option<String>) {
274274
// Switch branch if necessary
275-
match branch.as_ref().map(String::as_str) {
276-
Some("nightly") => {
275+
match branch.as_deref().unwrap_or(if config.sdk_nightly { "nightly" } else { "stable" }) {
276+
"nightly" => {
277277
info!("Switching to nightly");
278278
config.sdk_nightly = true;
279279
config.sdk_version = None;
280280
}
281-
Some("stable") => {
281+
"stable" => {
282282
info!("Switching to stable");
283283
config.sdk_nightly = false;
284284
config.sdk_version = None;
285285
}
286-
Some(ver) => {
286+
ver => {
287287
info!("Switching to {}", ver);
288288
config.sdk_nightly = false;
289289
config.sdk_version = Some(ver.into());
290290
}
291-
_ => {}
292291
};
293292

294293
info!("Updating SDK");

0 commit comments

Comments
 (0)