Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Add snippets for eprint, eprintln, todo, unimplemented, and unreachable #162

Merged
merged 1 commit into from
May 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions snippets/rust.cson
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
\t$2
}
'''
'eprint':
'prefix': 'eprint'
'body': 'eprint!("${1:{${2::?}\\}}", ${3});'
'eprintln':
'prefix': 'eprintln'
'body': 'eprintln!("${1:{${2::?}\\}}", ${3});'
'fn':
'prefix': 'fn'
'body': '''
Expand Down Expand Up @@ -124,6 +130,9 @@
\t}
}
'''
'todo':
'prefix': 'todo'
'body': 'todo!($1)$2'
'trait':
'prefix': 'trait'
'body': '''
Expand All @@ -134,6 +143,12 @@
'type':
'prefix': 'type'
'body': 'type ${1:TypeName} = ${2:TypeName};'
'unimplemented':
'prefix': 'unimplemented'
'body': 'unimplemented!($1)$2'
'unreachable':
'prefix': 'unreachable'
'body': 'unreachable!($1)$2'
'warn':
'prefix': 'warn'
'body': '#[warn(${1:lint})]'
Expand Down