File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " fast-float2"
3- version = " 0.2.2 "
3+ version = " 0.2.3 "
44authors = [
" Ivan Smirnov <[email protected] >" ,
" Alex Huszagh <[email protected] >" ]
55repository = " https://github.com/Alexhuszagh/fast-float-rust"
66documentation = " https://docs.rs/fast-float2"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ This crate provides a super-fast decimal number parser from strings into floats.
1212
1313``` toml
1414[dependencies ]
15- fast-float2 = " 0.2.2 "
15+ fast-float2 = " 0.2.3 "
1616```
1717
1818There are no dependencies and the crate can be used in a no_std context by disabling the "std" feature.
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ impl<'a> AsciiStr<'a> {
1818 }
1919 }
2020
21- pub fn len ( & self ) -> usize {
22- self . end as usize - self . ptr as usize
21+ pub fn len ( & self ) -> isize {
22+ self . end as isize - self . ptr as isize
2323 }
2424
2525 /// # Safety
@@ -28,7 +28,7 @@ impl<'a> AsciiStr<'a> {
2828 #[ inline]
2929 pub unsafe fn step_by ( & mut self , n : usize ) -> & mut Self {
3030 debug_assert ! (
31- n <= self . len( ) ,
31+ n < isize :: MAX as usize && n as isize < = self . len( ) ,
3232 "buffer overflow: stepping by greater than our buffer length."
3333 ) ;
3434 // SAFETY: Safe if `n <= self.len()`
You can’t perform that action at this time.
0 commit comments