MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / checked

Function checked

01_numbers/rust/cast.rs:32–34  ·  view source on GitHub ↗

in debug builds this will panic!

(x: i32, y: i32)

Source from the content-addressed store, hash-verified

30
31/// in debug builds this will panic!
32pub fn checked(x: i32, y: i32) -> i32 {
33 x * y
34}
35
36/// float equality (hack! - does not handle NaN/Infinity, see https://floating-point-gui.de/errors/comparison/)
37pub fn float_eq(a: f32, b: f32) -> bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected