This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! Chain macro in Rust | |
//! | |
//! A typical usage is to avoid nested match expressions. | |
//! | |
//! Supports: | |
//! - Pattern matching | |
//! - Or expressions (A | B => ...) | |
//! - Guarded statements (x if <cond> => ...) | |
//! - Implicit else (requires all arms to return same type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Phantom type for step 1. | |
pub enum Step1 {} | |
/// Phantom type for step 2. | |
pub enum Step2 {} | |
/// Contains data we set step by step. | |
pub struct Data<'a> { | |
/// 'a' is set in the first step. | |
a: Option<int>, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; json-reformat --- Reformat tool for JSON | |
;; Author: Wataru MIYAGUNI <gonngo@gmail.com> | |
;; Keywords: json | |
;; Copyright (c) 2012 Wataru MIYAGUNI | |
;; | |
;; MIT License | |
;; | |
;; Permission is hereby granted, free of charge, to any person obtaining |