Seagate / halon

High availability solution
Apache License 2.0
1 stars 0 forks source link

requestClusterStatus: don't use fromJust #1552

Closed vvv closed 5 years ago

vvv commented 5 years ago

fromJust is dangerous as it may cause runtime error:

λ> fromJust Nothing

<interactive>:5:1: error:
    Variable not in scope: fromJust :: Maybe a0 -> t

There is still one application of fromJust remaining in mero-halon/src/lib/HA/RecoveryCoordinator/Castor/Cluster/Rules.hs but at least there is a comment justifying its presence. (Also it is 2:17 AM and I'd rather go to bed.)

vvv commented 5 years ago

merged

vvv commented 5 years ago

@rajanikant.chirmade This is the patch, isn't it? :) Just review it.

rajanikantchirmade commented 5 years ago

Yes, will take a look. and update patch.