Skip to content

Commit a9dfc01

Browse files
authored
feat: update to edition 2021 and set minimum rust to 1.56 (#2789)
1 parent 80ffa87 commit a9dfc01

File tree

71 files changed

+229
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+229
-132
lines changed

.changes/rust-1.56.0.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"tauri": patch
3+
"cli.rs": patch
4+
"tauri-bundler": patch
5+
"tauri-utils": patch
6+
"tauri-macros": patch
7+
"tauri-codegen": patch
8+
"tauri-runtime": patch
9+
"tauri-runtime-wry": patch
10+
"tauri-driver": patch
11+
"tauri-build": patch
12+
---
13+
14+
The minimum Rust version is now `1.56`.

.github/workflows/test-core.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ jobs:
158158

159159
steps:
160160
- uses: actions/checkout@v2
161+
- name: install stable
162+
uses: actions-rs/toolchain@v1
163+
with:
164+
toolchain: stable
165+
override: true
161166
- name: install webkit2gtk (ubuntu only)
162167
if: matrix.platform == 'ubuntu-latest'
163168
run: |

core/tauri-build/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ license = "Apache-2.0 OR MIT"
77
homepage = "https://tauri.studio"
88
repository = "https://github.com/tauri-apps/tauri/tree/dev/core/tauri-build"
99
description = "build time code to pair with https://crates.io/crates/tauri"
10-
edition = "2018"
10+
edition = "2021"
11+
rust-version = "1.56"
1112
exclude = [ ".license_template", "CHANGELOG.md", "/target" ]
1213
readme = "README.md"
1314

core/tauri-codegen/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ license = "Apache-2.0 OR MIT"
77
homepage = "https://tauri.studio"
88
repository = "https://github.com/tauri-apps/tauri/tree/dev/core/tauri-codegen"
99
description = "code generation meant to be consumed inside of `tauri` through `tauri-build` or `tauri-macros`"
10-
edition = "2018"
10+
edition = "2021"
11+
rust-version = "1.56"
1112
exclude = [ ".license_template", "CHANGELOG.md", "/target" ]
1213
readme = "README.md"
1314

core/tauri-macros/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ license = "Apache-2.0 OR MIT"
77
homepage = "https://tauri.studio"
88
repository = "https://github.com/tauri-apps/tauri"
99
description = "Macros for the tauri crate."
10-
edition = "2018"
10+
edition = "2021"
11+
rust-version = "1.56"
1112
exclude = [ ".license_template", "CHANGELOG.md", "/target" ]
1213
readme = "README.md"
1314

core/tauri-macros/src/command/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct Handler {
1616
}
1717

1818
impl Parse for Handler {
19-
fn parse(input: &ParseBuffer) -> syn::Result<Self> {
19+
fn parse(input: &ParseBuffer<'_>) -> syn::Result<Self> {
2020
let paths = input.parse_terminated::<Path, Token![,]>(Path::parse)?;
2121

2222
// parse the command names and wrappers from the passed paths

core/tauri-macros/src/command/wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ enum ExecutionContext {
1919
}
2020

2121
impl Parse for ExecutionContext {
22-
fn parse(input: &ParseBuffer) -> syn::Result<Self> {
22+
fn parse(input: &ParseBuffer<'_>) -> syn::Result<Self> {
2323
if input.is_empty() {
2424
return Ok(Self::Blocking);
2525
}

core/tauri-macros/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub(crate) struct ContextItems {
1818
}
1919

2020
impl Parse for ContextItems {
21-
fn parse(input: &ParseBuffer) -> syn::parse::Result<Self> {
21+
fn parse(input: &ParseBuffer<'_>) -> syn::parse::Result<Self> {
2222
let config_file = if input.is_empty() {
2323
std::env::var("CARGO_MANIFEST_DIR").map(|m| PathBuf::from(m).join("tauri.conf.json"))
2424
} else {

core/tauri-macros/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// SPDX-License-Identifier: MIT
44

5-
extern crate proc_macro;
65
use crate::context::ContextItems;
76
use proc_macro::TokenStream;
87
use syn::{parse_macro_input, DeriveInput};

core/tauri-macros/src/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub(crate) struct Attributes {
1414
}
1515

1616
impl Parse for Attributes {
17-
fn parse(input: ParseStream) -> syn::Result<Self> {
17+
fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
1818
let default_type = input.parse()?;
1919
input.parse::<Token![,]>()?;
2020
Ok(Attributes {

0 commit comments

Comments
 (0)