Add a bunch more Clippings
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
println!("{:?}", #placeholderstart##placeholderend#);
|
|
||||||
1
Contents/Clippings/Rust.rs/Static string
Normal file
1
Contents/Clippings/Rust.rs/Static string
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static #PLACEHOLDERSTART#NAME#PLACEHOLDEREND#: &'static str = "#PLACEHOLDERSTART#...#PLACEHOLDEREND#";
|
||||||
3
Contents/Clippings/Rust.rs/Static strings slice
Normal file
3
Contents/Clippings/Rust.rs/Static strings slice
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#INDENT#static #PLACEHOLDERSTART#NAME#PLACEHOLDEREND#: &'static [&'static str] = &[
|
||||||
|
#PLACEHOLDERSTART#...#PLACEHOLDEREND#
|
||||||
|
];
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#indent#macro_rules! #placeholderstart#name#placeholderend# {
|
#indent#macro_rules! #placeholderstart#name#placeholderend# {
|
||||||
($name:ident: $input:expr => $result:expr) => {
|
($name:ident: $input:expr => $result:expr) => {
|
||||||
#[test]
|
\#[test]
|
||||||
fn $name() {
|
fn $name() {
|
||||||
assert_eq!($input, $result);
|
assert_eq!($input, $result);
|
||||||
}
|
}
|
||||||
|
|||||||
3
Contents/Clippings/Rust.rs/docs/Crate documentation test
Normal file
3
Contents/Clippings/Rust.rs/docs/Crate documentation test
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
//! ```
|
||||||
|
//! #placeholderstart##placeholderend#
|
||||||
|
//! ```
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#INDENT#/// ### Examples
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// #PLACEHOLDERSTART#...#PLACEHOLDEREND#
|
||||||
|
/// ```
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#INDENT#/// ### Panics
|
||||||
|
///
|
||||||
|
/// #PLACEHOLDERSTART#...#PLACEHOLDEREND#
|
||||||
7
Contents/Clippings/Rust.rs/std IO/Read lines from file
Normal file
7
Contents/Clippings/Rust.rs/std IO/Read lines from file
Normal 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#
|
||||||
|
}
|
||||||
1
Contents/Clippings/Rust.rs/std macros/println!
Normal file
1
Contents/Clippings/Rust.rs/std macros/println!
Normal file
@@ -0,0 +1 @@
|
|||||||
|
println!("#PLACEHOLDERSTART#...#PLACEHOLDEREND#");
|
||||||
1
Contents/Clippings/Rust.rs/std macros/println! (debug)
Normal file
1
Contents/Clippings/Rust.rs/std macros/println! (debug)
Normal file
@@ -0,0 +1 @@
|
|||||||
|
println!("{:?}", #placeholderstart#...#placeholderend#);
|
||||||
1
Contents/Clippings/Rust.rs/std macros/unimplemented!
Normal file
1
Contents/Clippings/Rust.rs/std macros/unimplemented!
Normal file
@@ -0,0 +1 @@
|
|||||||
|
unimplemented!()
|
||||||
1
Contents/Clippings/Rust.rs/std macros/unreachable!
Normal file
1
Contents/Clippings/Rust.rs/std macros/unreachable!
Normal file
@@ -0,0 +1 @@
|
|||||||
|
unreachable!()
|
||||||
Reference in New Issue
Block a user