polish: clean up the web module
This commit is contained in:
1 parent
1464d2e0a7
commit
823adc0834
15 files changed
+144
-50
No files matched your search
@@ -1,18 +1,15 @@
|
||||
use std::ops::{Index, IndexMut};
|
||||
//! This module provides a mirror of the VirtualDOM Element Slab using a Vector.
|
||||
|
||||
use std::ops::{Index, IndexMut};
|
||||
use web_sys::Node;
|
||||
|
||||
pub struct NodeSlab {
|
||||
pub(crate) struct NodeSlab {
|
||||
nodes: Vec<Option<Node>>,
|
||||
}
|
||||
|
||||
impl NodeSlab {
|
||||
pub fn new(capacity: usize) -> NodeSlab {
|
||||
let mut nodes = Vec::with_capacity(capacity);
|
||||
for x in 0..5 {
|
||||
nodes.push(None);
|
||||
}
|
||||
|
||||
let nodes = Vec::with_capacity(capacity);
|
||||
NodeSlab { nodes }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user