Remove smartmatch usage as it is discouraged.