mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-20 16:26:33 +00:00
Upgrade to syn/quote 1.0
Fresh off the presses let's start the update!
This commit is contained in:
@ -577,7 +577,7 @@ impl<'a> IdlType<'a> {
|
||||
.path
|
||||
.segments
|
||||
.last()
|
||||
.map(|p| p.value().ident == "JsValue")
|
||||
.map(|p| p.ident == "JsValue")
|
||||
.unwrap_or(false)
|
||||
{
|
||||
return Some(inner.clone());
|
||||
|
@ -121,7 +121,7 @@ fn parse(webidl_source: &str, allowed_types: Option<&[&str]>) -> Result<Program>
|
||||
for import in program.imports.iter_mut() {
|
||||
if let ast::ImportKind::Type(t) = &mut import.kind {
|
||||
t.extends.retain(|n| {
|
||||
let ident = &n.segments.last().unwrap().value().ident;
|
||||
let ident = &n.segments.last().unwrap().ident;
|
||||
first_pass_record.builtin_idents.contains(ident) || filter(&ident.to_string())
|
||||
});
|
||||
}
|
||||
|
@ -127,16 +127,18 @@ pub fn webidl_const_v_to_backend_const_v(v: &ConstValue) -> ast::ConstValue {
|
||||
}
|
||||
|
||||
/// From `ident` and `Ty`, create `ident: Ty` for use in e.g. `fn(ident: Ty)`.
|
||||
fn simple_fn_arg(ident: Ident, ty: syn::Type) -> syn::ArgCaptured {
|
||||
syn::ArgCaptured {
|
||||
pat: syn::Pat::Ident(syn::PatIdent {
|
||||
fn simple_fn_arg(ident: Ident, ty: syn::Type) -> syn::PatType {
|
||||
syn::PatType {
|
||||
pat: Box::new(syn::Pat::Ident(syn::PatIdent {
|
||||
attrs: Vec::new(),
|
||||
by_ref: None,
|
||||
mutability: None,
|
||||
ident,
|
||||
mutability: None,
|
||||
subpat: None,
|
||||
}),
|
||||
})),
|
||||
colon_token: Default::default(),
|
||||
ty,
|
||||
ty: Box::new(ty),
|
||||
attrs: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user