on master help sign in
Upgrade bumpalo
58cec8eNick Fitzgerald
Cargo.toml+1−1
@@ -8,7 +8,7 @@ edition = "2018"
8default = []
8default = []
9
9
10[dependencies]
10[dependencies]
11−bumpalo = "1.0.2"
11+bumpalo = "2.0.0"
12futures = "0.1"
12futures = "0.1"
13wasm-bindgen = "0.2.33"
13wasm-bindgen = "0.2.33"
14wasm-bindgen-futures = "0.3.10"
14wasm-bindgen-futures = "0.3.10"
src/change_list.rs+1−3
@@ -1,5 +1,5 @@
1use crate::Listener;
1use crate::Listener;
2−use bumpalo::{Bump, BumpAllocSafe};
2+use bumpalo::Bump;
3use log::*;
3use log::*;
4use std::fmt;
4use std::fmt;
5use std::sync::Once;
5use std::sync::Once;
@@ -240,8 +240,6 @@ pub enum ChangeDiscriminant {
240 RemoveEventListener = 13,
240 RemoveEventListener = 13,
241}
241}
242
242
243−impl BumpAllocSafe for ChangeDiscriminant {}
244−
245// Allocation utilities to ensure that we only allocation sequences of `u32`s
243// Allocation utilities to ensure that we only allocation sequences of `u32`s
246// into the change list's bump arena without any padding. This helps maintain
244// into the change list's bump arena without any padding. This helps maintain
247// the invariants required for `Bump::each_allocated_chunk`'s safety.
245// the invariants required for `Bump::each_allocated_chunk`'s safety.
src/node.rs+4−8
@@ -1,5 +1,5 @@
1use crate::{RootRender, VdomWeak};
1use crate::{RootRender, VdomWeak};
2−use bumpalo::{Bump, BumpAllocSafe};
2+use bumpalo::Bump;
3use std::fmt;
3use std::fmt;
4use std::mem;
4use std::mem;
5
5
@@ -54,10 +54,6 @@ pub struct Attribute<'a> {
54 pub value: &'a str,
54 pub value: &'a str,
55}
55}
56
56
57−impl<'a> BumpAllocSafe for Node<'a> {}
58−impl<'a> BumpAllocSafe for Listener<'a> {}
59−impl<'a> BumpAllocSafe for Attribute<'a> {}
60−
61impl fmt::Debug for Listener<'_> {
57impl fmt::Debug for Listener<'_> {
62 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
58 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
63 let (a, b) = self.get_callback_parts();
59 let (a, b) = self.get_callback_parts();
@@ -81,9 +77,9 @@ impl<'a> Node<'a> {
81 children: Children,
77 children: Children,
82 ) -> Node<'a>
78 ) -> Node<'a>
83 where
79 where
84− Listeners: 'a + BumpAllocSafe + AsRef<[Listener<'a>]>,
80+ Listeners: 'a + AsRef<[Listener<'a>]>,
85− Attributes: 'a + BumpAllocSafe + AsRef<[Attribute<'a>]>,
81+ Attributes: 'a + AsRef<[Attribute<'a>]>,
86− Children: 'a + BumpAllocSafe + AsRef<[Node<'a>]>,
82+ Children: 'a + AsRef<[Node<'a>]>,
87 {
83 {
88 let children: &'a Children = bump.alloc(children);
84 let children: &'a Children = bump.alloc(children);
89 let children: &'a [Node<'a>] = children.as_ref();
85 let children: &'a [Node<'a>] = children.as_ref();