Skip to content

Commit 9eaf636

Browse files
committed
simplify
1 parent 509af90 commit 9eaf636

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

+stdlib/+dotnet/file_checksum.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
hash_method (1,1) string
99
end
1010

11-
if any(strcmp(hash_method, {'sha256', 'SHA256'}))
11+
if ismember(hash_method, ["sha256", "SHA256"])
1212
hash_method = "SHA-256";
1313
end
1414

+stdlib/+java/file_checksum.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
hash_method (1,1) string
88
end
99

10-
if any(strcmp(hash_method, {'sha256', 'SHA256'}))
10+
if ismember(hash_method, ["sha256", "SHA256"])
1111
hash_method = "SHA-256";
1212
end
1313

+stdlib/+sys/is_char_device.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
if ispc()
99
% https://learn.microsoft.com/en-us/windows/console/console-handles
1010
charDevs = ["NUL", "CONIN$", "CONOUT$"];
11-
ok = any(contains(file, charDevs));
11+
ok = contains(file, charDevs);
1212
else
1313
cmd = sprintf('test -c %s', file);
1414

+stdlib/+sys/is_mount.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
if ~stdlib.exists(filepath), return, end
99

1010
if ispc()
11-
if any(ismember(filepath, ["/", "\"])) || ...
11+
if ismember(filepath, ["/", "\"]) || ...
1212
(endsWith(filepath, "/" | filesep) && isfolder(filepath) && filepath == stdlib.root(filepath))
1313
y = true;
1414
return

private/get_compiler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
if ispc()
3939
if isempty(co)
40-
if any(contains(comp, ["gcc", "g++", "gfortran"]))
40+
if contains(comp, ["gcc", "g++", "gfortran"])
4141
shell = "set PATH=" + fileparts(comp) + pathsep + "%PATH%";
4242
end
4343
else

test/TestHDF5.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function test_shape(tc)
191191

192192
function test_coerce(tc, type)
193193

194-
if any(type == ["string", "char"])
194+
if ismember(type, ["string", "char"])
195195
tc.assumeFalse(stdlib.matlabOlderThan("R2020b"))
196196
end
197197

0 commit comments

Comments
 (0)