make Fixnum::build_with harder to accidentally misuse
change trait bound order for better
This commit is contained in:
committed by
Mark Thom
parent
87ca083cfa
commit
cbdd0fbf15
@@ -1500,7 +1500,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
|
||||
|
||||
self.state_stack.push(TokenOrRedirect::NumberFocus(
|
||||
max_depth,
|
||||
NumberFocus::Unfocused(Number::Fixnum(Fixnum::build_with(port as i64))),
|
||||
NumberFocus::Unfocused(Number::Fixnum(Fixnum::build_with(port))),
|
||||
None,
|
||||
));
|
||||
self.state_stack.push(TokenOrRedirect::Comma);
|
||||
@@ -1527,7 +1527,10 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
|
||||
|
||||
TokenOrRedirect::NumberFocus(
|
||||
max_depth,
|
||||
NumberFocus::Unfocused(Number::Fixnum(Fixnum::build_with(idx_ptr_p))),
|
||||
NumberFocus::Unfocused(Number::Fixnum(
|
||||
/* FIXME this is not safe */
|
||||
unsafe { Fixnum::build_with_unchecked(idx_ptr_p) },
|
||||
)),
|
||||
None,
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user