difftreelog
build use now-stable async traits
in: master
5 files changed
Cargo.lockdiffbeforeafterboth111 "smallvec",111 "smallvec",112]112]113114[[package]]115name = "async-trait"116version = "0.1.74"117source = "registry+https://github.com/rust-lang/crates.io-index"118checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"119dependencies = [120 "proc-macro2",121 "quote",122 "syn 2.0.38",123]124113125[[package]]114[[package]]126name = "autocfg"115name = "autocfg"598dependencies = [587dependencies = [599 "annotate-snippets",588 "annotate-snippets",600 "anyhow",589 "anyhow",601 "async-trait",602 "bincode",590 "bincode",603 "derivative",591 "derivative",604 "hashbrown 0.14.2",592 "hashbrown 0.14.2",Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,7 +35,6 @@
rustc-hash = "1.1"
bincode = "1.3"
annotate-snippets = "0.9.1"
-async-trait = "0.1.60"
num-bigint = "0.4.3"
derivative = "2.2.0"
strsim = "0.10.0"
crates/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"]