mirror of
https://github.com/gechandesu/ranges.git
synced 2026-11-15 21:13:56 +03:00
add uint convert, remove isize, usize
This commit is contained in:
1 parent
ceed23ceed
commit
c375f53259
2 files changed
+3
-6
No files matched your search
@@ -258,8 +258,8 @@ fn convert_string[T](s string) !T {
|
|||||||
i64 {
|
i64 {
|
||||||
return strconv.atoi64(s)!
|
return strconv.atoi64(s)!
|
||||||
}
|
}
|
||||||
isize {
|
uint {
|
||||||
return isize(strconv.atoi64(s)!)
|
return uint(strconv.atou64(s)!)
|
||||||
}
|
}
|
||||||
u8 {
|
u8 {
|
||||||
return strconv.atou8(s)!
|
return strconv.atou8(s)!
|
||||||
@@ -273,9 +273,6 @@ fn convert_string[T](s string) !T {
|
|||||||
u64 {
|
u64 {
|
||||||
return strconv.atou64(s)!
|
return strconv.atou64(s)!
|
||||||
}
|
}
|
||||||
usize {
|
|
||||||
return usize(strconv.atou64(s)!)
|
|
||||||
}
|
|
||||||
f32 {
|
f32 {
|
||||||
return f32(strconv.atof64(s)!)
|
return f32(strconv.atof64(s)!)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user