Backed out 5 changesets (bug 1890092, bug 1888683) for causing build bustages & crash...
[gecko.git] / third_party / rust / uniffi_bindgen / src / bindings / python / templates / BooleanHelper.py
blob6775e9e132e146c0dfa8aad28726069e86e3c040
1 class _UniffiConverterBool(_UniffiConverterPrimitive):
2 @classmethod
3 def check(cls, value):
4 return not not value
6 @classmethod
7 def read(cls, buf):
8 return cls.lift(buf.read_u8())
10 @classmethod
11 def write_unchecked(cls, value, buf):
12 buf.write_u8(value)
14 @staticmethod
15 def lift(value):
16 return value != 0