Wouldn't it be more idiomatic to return Result instead of asserting hr == 0 all over the place?
Not exposing the abillity to fail and instead panicing makes the api unidiomatic in my opinion, since e.g. FontDescriptor can be manipulated by the user, which in turn can cause hr != 0.
Wouldn't it be more idiomatic to return Result instead of asserting
hr == 0all over the place?Not exposing the abillity to fail and instead panicing makes the api unidiomatic in my opinion, since e.g. FontDescriptor can be manipulated by the user, which in turn can cause
hr != 0.