File tree 1 file changed +19
-19
lines changed
1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -41,22 +41,22 @@ visit the new file."
41
41
if not. Move cursor to the end of macro."
42
42
(when (rust-in-str)
43
43
(up-list -1 t t ))
44
- (setq safe-to-forward t )
45
- (save-excursion
46
- (condition-case nil
47
- (forward-sexp )
48
- (error (setq safe-to-forward nil )
49
- nil )))
50
- (cond
51
- ((not safe-to-forward)
52
- (rust-insert-dbg-alone))
53
- (t
54
- (insert " (" )
55
- (forward-sexp )
56
- (insert " )" )
57
- (backward-sexp )
58
- (insert " dbg!" )
59
- (forward-sexp ))))
44
+ (let (( safe-to-forward t ) )
45
+ (save-excursion
46
+ (condition-case nil
47
+ (forward-sexp )
48
+ (error (setq safe-to-forward nil )
49
+ nil )))
50
+ (cond
51
+ ((not safe-to-forward)
52
+ (rust-insert-dbg-alone))
53
+ (t
54
+ (insert " (" )
55
+ (forward-sexp )
56
+ (insert " )" )
57
+ (backward-sexp )
58
+ (insert " dbg!" )
59
+ (forward-sexp ) ))))
60
60
61
61
(defun rust-insert-dbg-region ()
62
62
" Insert the dbg! macro around a region. Move cursor to the end of macro."
@@ -77,9 +77,9 @@ if not. Move cursor to the end of macro."
77
77
(defun rust-dbg-wrap-or-unwrap ()
78
78
" Either remove or add the dbg! macro."
79
79
(interactive )
80
-
80
+
81
81
(cond
82
-
82
+
83
83
; ; region
84
84
((region-active-p )
85
85
(rust-insert-dbg-region))
@@ -106,7 +106,7 @@ if not. Move cursor to the end of macro."
106
106
(delete-pair ))
107
107
(t (rust-insert-dbg-sexp)))))
108
108
)
109
- )
109
+ )
110
110
111
111
(defun rust-toggle-mutability ()
112
112
" Toggles the mutability of the variable defined on the current line"
You can’t perform that action at this time.
0 commit comments