douban/beansdb — pull request #2 by huoxy (2012-04-26 07:34:46+00:00)
Title: make your "switch" shorter!

- switch (hs_delete(store, key)) {
- case true:
- out_string(c, "DELETED");
- break;
- case false:
- out_string(c, "NOT_FOUND");
- break;
+ out_string(c, hs_delete(store, key)?"DELETED":"NOT_FOUND");