Skip to content

Commit 4de8594

Browse files
committed
speed up lint
1 parent e056a12 commit 4de8594

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

+stdlib/filename.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
function f = filename(p, method)
99
arguments
1010
p string
11-
method {mustBeMember(method, {'pattern', 'regexp'})} = 'pattern'
11+
method = 'pattern'
1212
end
1313

1414
% the pattern method is a few percent faster than regexp
@@ -18,6 +18,7 @@
1818
case 'regexp'
1919
f = regexp(p, ['[^/\' filesep ']*$'], 'match', 'once');
2020
f(ismissing(f)) = "";
21+
otherwise, error('must be method "pattern" or "regexp"')
2122
end
2223

2324
end

0 commit comments

Comments
 (0)