Gets the name of the class to call methods on, if applicable.
(&self)
| 1082 | } |
| 1083 | |
| 1084 | pub fn is_zero(&self) -> bool { |
| 1085 | match self { |
| 1086 | Constant::I8(i) => *i == 0, |
| 1087 | Constant::I16(i) => *i == 0, |
| 1088 | Constant::I32(i) => *i == 0, |
| 1089 | Constant::I64(i) => *i == 0, |
| 1090 | Constant::F32(f) => *f == 0.0, |
| 1091 | Constant::F64(f) => *f == 0.0, |
| 1092 | Constant::Char(c) => *c == '\0', |
| 1093 | Constant::Boolean(b) => !*b, |
| 1094 | _ => false, // Null, String, Array, etc. are not zero |
| 1095 | } |
| 1096 | } |
| 1097 | |
| 1098 | pub fn is_one(&self) -> bool { |
| 1099 | match self { |
no outgoing calls
no test coverage detected