diff --git a/Contents/Clippings/Rust.rs/Debug println b/Contents/Clippings/Rust.rs/Debug println deleted file mode 100644 index 1b4824f..0000000 --- a/Contents/Clippings/Rust.rs/Debug println +++ /dev/null @@ -1 +0,0 @@ -println!("{:?}", #placeholderstart##placeholderend#); \ No newline at end of file diff --git a/Contents/Clippings/Rust.rs/Static string b/Contents/Clippings/Rust.rs/Static string new file mode 100644 index 0000000..b884bfc --- /dev/null +++ b/Contents/Clippings/Rust.rs/Static string @@ -0,0 +1 @@ +static #PLACEHOLDERSTART#NAME#PLACEHOLDEREND#: &'static str = "#PLACEHOLDERSTART#...#PLACEHOLDEREND#"; diff --git a/Contents/Clippings/Rust.rs/Static strings slice b/Contents/Clippings/Rust.rs/Static strings slice new file mode 100644 index 0000000..d56e097 --- /dev/null +++ b/Contents/Clippings/Rust.rs/Static strings slice @@ -0,0 +1,3 @@ +#INDENT#static #PLACEHOLDERSTART#NAME#PLACEHOLDEREND#: &'static [&'static str] = &[ + #PLACEHOLDERSTART#...#PLACEHOLDEREND# +]; diff --git a/Contents/Clippings/Rust.rs/Test macro b/Contents/Clippings/Rust.rs/Test macro index c127780..28d472b 100644 --- a/Contents/Clippings/Rust.rs/Test macro +++ b/Contents/Clippings/Rust.rs/Test macro @@ -1,6 +1,6 @@ #indent#macro_rules! #placeholderstart#name#placeholderend# { ($name:ident: $input:expr => $result:expr) => { - #[test] + \#[test] fn $name() { assert_eq!($input, $result); } diff --git a/Contents/Clippings/Rust.rs/docs/Crate documentation test b/Contents/Clippings/Rust.rs/docs/Crate documentation test new file mode 100644 index 0000000..ffa2052 --- /dev/null +++ b/Contents/Clippings/Rust.rs/docs/Crate documentation test @@ -0,0 +1,3 @@ +//! ``` +//! #placeholderstart##placeholderend# +//! ``` \ No newline at end of file diff --git a/Contents/Clippings/Rust.rs/docs/Documentation examples block b/Contents/Clippings/Rust.rs/docs/Documentation examples block new file mode 100644 index 0000000..acf6acb --- /dev/null +++ b/Contents/Clippings/Rust.rs/docs/Documentation examples block @@ -0,0 +1,5 @@ +#INDENT#/// ### Examples +/// +/// ``` +/// #PLACEHOLDERSTART#...#PLACEHOLDEREND# +/// ``` \ No newline at end of file diff --git a/Contents/Clippings/Rust.rs/docs/Documentation panics block b/Contents/Clippings/Rust.rs/docs/Documentation panics block new file mode 100644 index 0000000..2fc3b01 --- /dev/null +++ b/Contents/Clippings/Rust.rs/docs/Documentation panics block @@ -0,0 +1,3 @@ +#INDENT#/// ### Panics +/// +/// #PLACEHOLDERSTART#...#PLACEHOLDEREND# \ No newline at end of file diff --git a/Contents/Clippings/Rust.rs/std IO/Read lines from file b/Contents/Clippings/Rust.rs/std IO/Read lines from file new file mode 100644 index 0000000..af875af --- /dev/null +++ b/Contents/Clippings/Rust.rs/std IO/Read lines from 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# +} \ No newline at end of file diff --git a/Contents/Clippings/Rust.rs/Read lines from stdin b/Contents/Clippings/Rust.rs/std IO/Read lines from stdin similarity index 100% rename from Contents/Clippings/Rust.rs/Read lines from stdin rename to Contents/Clippings/Rust.rs/std IO/Read lines from stdin diff --git a/Contents/Clippings/Rust.rs/macro_rules! b/Contents/Clippings/Rust.rs/std macros/macro_rules! similarity index 100% rename from Contents/Clippings/Rust.rs/macro_rules! rename to Contents/Clippings/Rust.rs/std macros/macro_rules! diff --git a/Contents/Clippings/Rust.rs/std macros/println! b/Contents/Clippings/Rust.rs/std macros/println! new file mode 100644 index 0000000..909cda3 --- /dev/null +++ b/Contents/Clippings/Rust.rs/std macros/println! @@ -0,0 +1 @@ +println!("#PLACEHOLDERSTART#...#PLACEHOLDEREND#"); \ No newline at end of file diff --git a/Contents/Clippings/Rust.rs/std macros/println! (debug) b/Contents/Clippings/Rust.rs/std macros/println! (debug) new file mode 100644 index 0000000..3347ef0 --- /dev/null +++ b/Contents/Clippings/Rust.rs/std macros/println! (debug) @@ -0,0 +1 @@ +println!("{:?}", #placeholderstart#...#placeholderend#); \ No newline at end of file diff --git a/Contents/Clippings/Rust.rs/std macros/unimplemented! b/Contents/Clippings/Rust.rs/std macros/unimplemented! new file mode 100644 index 0000000..2d23f0c --- /dev/null +++ b/Contents/Clippings/Rust.rs/std macros/unimplemented! @@ -0,0 +1 @@ +unimplemented!() \ No newline at end of file diff --git a/Contents/Clippings/Rust.rs/std macros/unreachable! b/Contents/Clippings/Rust.rs/std macros/unreachable! new file mode 100644 index 0000000..ae77a27 --- /dev/null +++ b/Contents/Clippings/Rust.rs/std macros/unreachable! @@ -0,0 +1 @@ +unreachable!() \ No newline at end of file