diff options
Diffstat (limited to '.emacs.d/snippets/rust-mode/display')
| -rw-r--r-- | .emacs.d/snippets/rust-mode/display | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.emacs.d/snippets/rust-mode/display b/.emacs.d/snippets/rust-mode/display new file mode 100644 index 0000000..1764f67 --- /dev/null +++ b/.emacs.d/snippets/rust-mode/display | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | # -*- mode: snippet -*- | ||
| 2 | # name: impl Display for Type { fn fmt (...) } | ||
| 3 | # key: display | ||
| 4 | # -- | ||
| 5 | impl Display for ${1:Type} { | ||
| 6 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
| 7 | write!(f, "$0") | ||
| 8 | } | ||
| 9 | } | ||
