File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ defmodule Mix.Tasks.Rustler.New do
24
24
root = Path . join ( :code . priv_dir ( :rustler ) , "templates/" )
25
25
26
26
for { format , source , _ } <- @ basic do
27
- unless format = = :keep do
27
+ if format ! = :keep do
28
28
@ external_resource Path . join ( root , source )
29
29
defp render ( unquote ( source ) ) , do: unquote ( File . read! ( Path . join ( root , source ) ) )
30
30
end
@@ -90,7 +90,7 @@ defmodule Mix.Tasks.Rustler.New do
90
90
end
91
91
92
92
defp check_module_name_validity! ( name ) do
93
- unless name =~ ~r/ ^[A-Z]\w *(\. [A-Z]\w *)*$/ do
93
+ if ! ( name =~ ~r/ ^[A-Z]\w *(\. [A-Z]\w *)*$/ ) do
94
94
Mix . raise (
95
95
"Module name must be a valid Elixir alias (for example: Foo.Bar), got: #{ inspect ( name ) } "
96
96
)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ defmodule Rustler.Compiler do
7
7
def compile_crate ( otp_app , config , opts ) do
8
8
config = Config . from ( otp_app , config , opts )
9
9
10
- unless config . skip_compilation? do
10
+ if ! config . skip_compilation? do
11
11
crate_full_path = Path . expand ( config . path , File . cwd! ( ) )
12
12
13
13
File . mkdir_p! ( priv_dir ( ) )
@@ -54,7 +54,7 @@ defmodule Rustler.Compiler do
54
54
throw_error ( :rustup_not_installed )
55
55
end
56
56
57
- unless Rustup . version_installed? ( version ) do
57
+ if ! Rustup . version_installed? ( version ) do
58
58
throw_error ( { :rust_version_not_installed , version } )
59
59
end
60
60
@@ -176,7 +176,7 @@ defmodule Rustler.Compiler do
176
176
end
177
177
178
178
defp toml_data ( path ) do
179
- unless File . dir? ( path ) do
179
+ if ! File . dir? ( path ) do
180
180
throw_error ( { :nonexistent_crate_directory , path } )
181
181
end
182
182
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ defmodule SerdeRustlerTests.NifTest do
69
69
Helpers . run_ser ( test_name , expected_term )
70
70
Helpers . run_de ( test_name , expected_term )
71
71
72
- unless ctx [ :skip ] = = :transcode do
72
+ if ctx [ :skip ] ! = :transcode do
73
73
Helpers . run_transcode ( test_name , expected_term )
74
74
end
75
75
end
You can’t perform that action at this time.
0 commit comments