Skip to content

Commit 85b773d

Browse files
0xAndoroidfacebook-github-bot
authored andcommitted
Implement Allocative for i128 and u128 (#16)
Summary: Pull Request resolved: #16 Reviewed By: Will-MingLun-Li Differential Revision: D81100961 Pulled By: scottcao fbshipit-source-id: 42729615043fc60ae1683217a14b5184654208dd
1 parent 362031c commit 85b773d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

allocative/src/impls/std/primitive.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ impl Allocative for u64 {
3535
}
3636
}
3737

38+
impl Allocative for u128 {
39+
fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
40+
visitor.visit_simple_sized::<Self>();
41+
}
42+
}
43+
3844
impl Allocative for usize {
3945
fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
4046
visitor.visit_simple_sized::<Self>();
@@ -65,6 +71,12 @@ impl Allocative for i64 {
6571
}
6672
}
6773

74+
impl Allocative for i128 {
75+
fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
76+
visitor.visit_simple_sized::<Self>();
77+
}
78+
}
79+
6880
impl Allocative for isize {
6981
fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
7082
visitor.visit_simple_sized::<Self>();

0 commit comments

Comments
 (0)