Add a bunch more Clippings

This commit is contained in:
Ben S
2015-11-23 18:24:46 +00:00
parent dea280c188
commit 8ee5fa4793
14 changed files with 27 additions and 2 deletions

View File

@@ -1 +0,0 @@
println!("{:?}", #placeholderstart##placeholderend#);

View File

@@ -0,0 +1 @@
static #PLACEHOLDERSTART#NAME#PLACEHOLDEREND#: &'static str = "#PLACEHOLDERSTART#...#PLACEHOLDEREND#";

View File

@@ -0,0 +1,3 @@
#INDENT#static #PLACEHOLDERSTART#NAME#PLACEHOLDEREND#: &'static [&'static str] = &[
#PLACEHOLDERSTART#...#PLACEHOLDEREND#
];

View File

@@ -1,6 +1,6 @@
#indent#macro_rules! #placeholderstart#name#placeholderend# {
($name:ident: $input:expr => $result:expr) => {
#[test]
\#[test]
fn $name() {
assert_eq!($input, $result);
}

View File

@@ -0,0 +1,3 @@
//! ```
//! #placeholderstart##placeholderend#
//! ```

View File

@@ -0,0 +1,5 @@
#INDENT#/// ### Examples
///
/// ```
/// #PLACEHOLDERSTART#...#PLACEHOLDEREND#
/// ```

View File

@@ -0,0 +1,3 @@
#INDENT#/// ### Panics
///
/// #PLACEHOLDERSTART#...#PLACEHOLDEREND#

View File

@@ -0,0 +1,7 @@
#INDENT#let mut f = try!(File::open("log.txt"));
let mut reader = BufReader::new(f);
for line in reader.lines() {
let line = line.unwrap();
#PLACEHOLDERSTART#...#PLACEHOLDEREND#
}

View File

@@ -0,0 +1 @@
println!("#PLACEHOLDERSTART#...#PLACEHOLDEREND#");

View File

@@ -0,0 +1 @@
println!("{:?}", #placeholderstart#...#placeholderend#);

View File

@@ -0,0 +1 @@
unimplemented!()

View File

@@ -0,0 +1 @@
unreachable!()