Commit a9e77da4 authored by Ian P. Cooke's avatar Ian P. Cooke Committed by Federico Mena Quintero

replaced deprecated atomic initializer with const fn `new`

parent 85ec00cf
Pipeline #104760 failed with stages
in 6 minutes and 14 seconds
......@@ -125,7 +125,7 @@ impl<'lt, 'ast: 'lt, Boilerplate: boilerplate::Boilerplate<'ast>>
};
quote! {
static mut PRIV: PrivateStatic = PrivateStatic {
gtype: ::std::sync::atomic::ATOMIC_USIZE_INIT,
gtype: ::std::sync::atomic::AtomicUsize::new(0),
private_offset: 0i32,
private: {
#structname {
......
......@@ -40,7 +40,7 @@ impl Parse for ast::Item {
res.attrs = attrs;
ast::Item::Class(res)
})
} else if lookahead.peek(Token![impl ]) {
} else if lookahead.peek(Token![impl]) {
input.parse().map(ast::Item::Impl)
} else if lookahead.peek(keywords::interface) {
input.parse().map(|mut res: ast::Interface| {
......@@ -100,7 +100,7 @@ impl Parse for ast::Interface {
impl Parse for ast::Impl {
fn parse(input: ParseStream<'_>) -> Result<Self> {
input.parse::<Token![impl ]>()?;
input.parse::<Token![impl]>()?;
let trait_ = if input.peek2(Token![for]) {
let trait_ = input.parse()?;
input.parse::<Token![for]>()?;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment