mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-19 16:01:23 +00:00
Migrate all crates to the 2018 edition
Most of the CLI crates were already in the 2018 edition, and it turns out that one of the macro crates was already in the 2018 edition so we may as well move everything to the 2018 edition! Always nice to remove those `extern crate` statements nowadays! This commit also does a `cargo fmt --all` to make sure we're conforming with style again.
This commit is contained in:
Cargo.toml
crates
anyref-xform
src
backend
cli-support
cli
tests
wasm-bindgen
futures
js-sys
macro-support
src
macro
shared
test-macro
test
typescript-tests
web-sys
webidl-tests
webidl
src
tests
@ -2,7 +2,7 @@ use crate::decode;
|
||||
use crate::descriptor::{Descriptor, VectorKind};
|
||||
use crate::{Bindgen, EncodeInto, OutputMode};
|
||||
use failure::{bail, Error, ResultExt};
|
||||
use std::collections::{HashMap, HashSet, BTreeMap};
|
||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use walrus::{MemoryId, Module};
|
||||
@ -2998,8 +2998,10 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
return Ok(());
|
||||
}
|
||||
if !self.cx.config.mode.nodejs() && !self.cx.config.mode.bundler() {
|
||||
bail!("NPM dependencies have been specified in `{}` but \
|
||||
this is only compatible with the `bundler` and `nodejs` targets");
|
||||
bail!(
|
||||
"NPM dependencies have been specified in `{}` but \
|
||||
this is only compatible with the `bundler` and `nodejs` targets"
|
||||
);
|
||||
}
|
||||
let contents = fs::read_to_string(path).context(format!("failed to read `{}`", path))?;
|
||||
let json: serde_json::Value = serde_json::from_str(&contents)?;
|
||||
|
Reference in New Issue
Block a user