Skip to content

Commit 3d571e7

Browse files
authored
feat: bump MSRV to 1.58 (#356)
* feat: bump MSRV to 1.58 * Update msrv-1.58.md
1 parent ed9a7e8 commit 3d571e7

6 files changed

Lines changed: 21 additions & 33 deletions

File tree

.changes/msrv-1.58.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-tauri-app": "minor"
3+
---
4+
5+
Bump MSRV to `1.58`

Cargo.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repository = "https://github.com/tauri-apps/create-tauri-app"
1010
keywords = [ "tauri" ]
1111
categories = [ "gui" ]
1212
exclude = [ "/node" ]
13-
rust-version = "1.57"
13+
rust-version = "1.58"
1414

1515
[[bin]]
1616
name = "cargo-create-tauri-app"
@@ -20,4 +20,4 @@ path = "src/main.rs"
2020
anyhow = "1"
2121
dialoguer = "0.10"
2222
pico-args = "0.5"
23-
rust-embed = { version = "6.4", features = [ "compression", "interpolate-folder-path" ] }
23+
rust-embed = { version = "6.6", features = [ "compression", "interpolate-folder-path" ] }

packages/cli/src/category.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ impl Display for Category {
3939
.collect::<Vec<_>>()
4040
.join(", ");
4141
match self {
42-
Category::Rust => write!(f, "Rust - ({})", managers,),
43-
Category::JsTs => write!(f, "TypeScript / JavaScript - ({})", managers,),
42+
Category::Rust => write!(f, "Rust - ({managers})"),
43+
Category::JsTs => write!(f, "TypeScript / JavaScript - ({managers})"),
4444
}
4545
}
4646
}

packages/cli/src/manifest.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,22 @@ impl<'a> Manifest<'a> {
4444
let (k, v) = (
4545
s.next()
4646
.with_context(|| {
47-
format!("parsing manifest: key is not found in line {}", line_number)
47+
format!("parsing manifest: key is not found in line {line_number}")
4848
})?
4949
.trim(),
5050
s.next()
5151
.with_context(|| {
52-
format!(
53-
"parsing manifest: value is not found in line {}",
54-
line_number
55-
)
52+
format!("parsing manifest: value is not found in line {line_number}")
5653
})?
5754
.trim(),
5855
);
5956

6057
if k.is_empty() {
61-
bail!("parsing manifest: key is empty in line {}", line_number);
58+
bail!("parsing manifest: key is empty in line {line_number}");
6259
}
6360

6461
if v.is_empty() {
65-
bail!("parsing manifest: value is empty in line {}", line_number);
62+
bail!("parsing manifest: value is empty in line {line_number}");
6663
}
6764

6865
#[allow(clippy::nonminimal_bool)]

packages/cli/src/template.rs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -157,25 +157,12 @@ impl<'a> Template {
157157
Template::Yew | Template::Leptos| Template::Sycamore => Some(
158158
format!(
159159
"{ITALIC}{DIM}You also need to install:\n 1. {DIMRESET}{YELLOW}tauri-cli{WHITE}{DIM} ({DIMRESET}{BLUE}{tauri_cli_cmd}{WHITE}{DIM})\n 2. {DIMRESET}{YELLOW}trunk{WHITE}{DIM} ({DIMRESET}{BLUE}https://trunkrs.dev/#install{WHITE}{DIM})\n 3. {DIMRESET}{YELLOW}wasm32{WHITE}{DIM} rust target ({DIMRESET}{BLUE}rustup target add wasm32-unknown-unknown{WHITE}{DIM}){DIMRESET}{RESET}",
160-
ITALIC = ITALIC,
161-
DIM = DIM,
162-
DIMRESET = DIMRESET,
163-
YELLOW = YELLOW,
164-
WHITE = WHITE,
165-
BLUE = BLUE,
166-
RESET = RESET,
167160
tauri_cli_cmd = tauri_cli_cmd,
168161
),
169162
),
170163
Template::Vanilla if pkg_manager == PackageManager::Cargo => Some(
171164
format!(
172165
"{ITALIC}{DIM}You also need to install{DIMRESET} {YELLOW}tauri-cli{WHITE} {DIM}({DIMRESET}{BLUE}{tauri_cli_cmd}{WHITE}{DIM})",
173-
ITALIC = ITALIC,
174-
DIM = DIM,
175-
DIMRESET = DIMRESET,
176-
YELLOW = YELLOW,
177-
WHITE = WHITE,
178-
BLUE = BLUE,
179166
tauri_cli_cmd = tauri_cli_cmd,
180167
),
181168
),
@@ -191,7 +178,7 @@ impl<'a> Template {
191178
alpha: bool,
192179
mobile: bool,
193180
) -> anyhow::Result<()> {
194-
let manifest_bytes = FRAGMENTS::get(&format!("fragment-{}/_cta_manifest_", self))
181+
let manifest_bytes = FRAGMENTS::get(&format!("fragment-{self}/_cta_manifest_"))
195182
.with_context(|| "Failed to get manifest bytes")?
196183
.data;
197184
let manifest_str = String::from_utf8(manifest_bytes.to_vec())?;
@@ -322,15 +309,15 @@ impl<'a> Template {
322309
.next()
323310
.unwrap()
324311
.as_os_str()
325-
== path::PathBuf::from(format!("fragment-{}", self))
312+
== path::PathBuf::from(format!("fragment-{self}"))
326313
}) {
327314
write_file(&file)?;
328315
}
329316

330317
// then write extra files specified in the fragment manifest
331318
for (src, dest) in manifest.files {
332-
let data = FRAGMENTS::get(&format!("_assets_/{}", src))
333-
.with_context(|| format!("Failed to get asset file bytes: {}", src))?
319+
let data = FRAGMENTS::get(&format!("_assets_/{src}"))
320+
.with_context(|| format!("Failed to get asset file bytes: {src}"))?
334321
.data;
335322
let dest = target_dir.join(dest);
336323
let parent = dest.parent().unwrap();

0 commit comments

Comments
 (0)