difftreelog
build use now-stable async traits
in: master
5 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -112,17 +112,6 @@
]
[[package]]
-name = "async-trait"
-version = "0.1.74"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.38",
-]
-
-[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -598,7 +587,6 @@
dependencies = [
"annotate-snippets",
"anyhow",
- "async-trait",
"bincode",
"derivative",
"hashbrown 0.14.2",
Cargo.tomldiffbeforeafterboth1[workspace]2package.version = "0.5.0-pre95"3package.repository = "https://github.com/CertainLach/jrsonnet"4members = ["crates/*", "bindings/jsonnet", "cmds/*", "tests", "xtask"]5default-members = ["cmds/jrsonnet"]6resolver = "2"78[workspace.dependencies]9jrsonnet-evaluator = { path = "./crates/jrsonnet-evaluator", version = "0.5.0-pre95" }10jrsonnet-macros = { path = "./crates/jrsonnet-macros", version = "0.5.0-pre95" }11jrsonnet-parser = { path = "./crates/jrsonnet-parser", version = "0.5.0-pre95" }12jrsonnet-rowan-parser = { path = "./crates/jrsonnet-rowan-parser", version = "0.5.0-pre95" }13jrsonnet-interner = { path = "./crates/jrsonnet-interner", version = "0.5.0-pre95" }14jrsonnet-stdlib = { path = "./crates/jrsonnet-stdlib", version = "0.5.0-pre95" }15jrsonnet-cli = { path = "./crates/jrsonnet-cli", version = "0.5.0-pre95" }16jrsonnet-types = { path = "./crates/jrsonnet-types", version = "0.5.0-pre95" }1718jrsonnet-gcmodule = "0.3.6"19ass-stroke = { git = "https://github.com/CertainLach/ass-stroke", version = "0.1.0" }2021serde = "1.0.190"22serde_json = "1.0.107"23serde_yaml_with_quirks = "0.8.24"2425anyhow = "1.0.48"26thiserror = "1.0"27mimallocator = "0.1.3"28indoc = "2.0"29dprint-core = "0.63.2"30insta = "1.15"31tempfile = "3.8"32pathdiff = "0.2.1"33hashbrown = "0.14.2"34static_assertions = "1.1"35rustc-hash = "1.1"36bincode = "1.3"37annotate-snippets = "0.9.1"38async-trait = "0.1.60"39num-bigint = "0.4.3"40derivative = "2.2.0"41strsim = "0.10.0"42structdump = "0.2.0"43proc-macro2 = "1.0"44quote = "1.0"45syn = "2.0"46peg = "0.8.2"47drop_bomb = "0.1.5"48logos = "0.13.0"49miette = "5.5.0"50rowan = "0.15"51text-size = "1.1"52md5 = "0.7.0"53sha1 = "0.10.5"54sha2 = "0.10.6"55sha3 = "0.10.8"56base64 = "0.21.0"57indexmap = "2.0.2"58itertools = "0.11.0"59ungrammar = "1.16.1"60xshell = "0.2.2"6162clap = "4.4"63clap_complete = "4.4"6465lsp-server = "0.7.4"66lsp-types = "0.94.1"6768#[profile.test]69#opt-level = 17071[profile.release]72opt-level = 373lto = "fat"74codegen-units = 175debug = 076panic = "abort"77strip = true7879[profile.releasedebug]80inherits = "release"81debug = 282panic = "unwind"83strip = falsecrates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth--- a/crates/jrsonnet-evaluator/Cargo.toml
+++ b/crates/jrsonnet-evaluator/Cargo.toml
@@ -14,7 +14,7 @@
# Allows library authors to throw custom errors
anyhow-error = ["anyhow"]
# Adds ability to build import closure in async
-async-import = ["async-trait"]
+async-import = []
# Allows to preserve field order in objects
exp-preserve-order = []
@@ -54,8 +54,6 @@
bincode = { workspace = true, optional = true }
# Explaining traces
annotate-snippets = { workspace = true, features = ["color"], optional = true }
-# Async imports
-async-trait = { workspace = true, optional = true }
# Bigint
num-bigint = { workspace = true, features = ["serde"], optional = true }
derivative.workspace = true
crates/jrsonnet-evaluator/src/async_import.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/async_import.rs
+++ b/crates/jrsonnet-evaluator/src/async_import.rs
@@ -1,6 +1,5 @@
use std::{cell::RefCell, path::Path};
-use async_trait::async_trait;
use jrsonnet_gcmodule::Trace;
use jrsonnet_interner::IStr;
use jrsonnet_parser::{
@@ -218,7 +217,7 @@
}
}
-#[async_trait(?Send)]
+#[allow(async_fn_in_trait)] // we don't care about `Send` bound
pub trait AsyncImportResolver {
type Error;
/// Resolves file path, e.g. `(/home/user/manifests, b.libjsonnet)` can correspond
rust-toolchain.tomldiffbeforeafterboth--- /dev/null
+++ b/rust-toolchain.toml
@@ -0,0 +1,3 @@
+[toolchain]
+channel = "nightly-2023-10-28"
+components = ["rustfmt", "clippy"]