@@ -56,7 +56,7 @@ unittest
56
56
assert (t.media == string .init && t.subtype == string .init);
57
57
}
58
58
59
- private @nogc @trusted bool allSymbolsAreValid(const (char )[] name) nothrow pure
59
+ private @nogc @trusted bool allSymbolsAreValid(scope const (char )[] name) nothrow pure
60
60
{
61
61
import std.ascii : isAlpha, isDigit;
62
62
for (size_t i=0 ; i< name.length; ++ i) {
@@ -68,7 +68,7 @@ private @nogc @trusted bool allSymbolsAreValid(const(char)[] name) nothrow pure
68
68
return true ;
69
69
}
70
70
71
- private @nogc @safe bool isValidMimeTypeName(const (char )[] name) nothrow pure
71
+ private @nogc @safe bool isValidMimeTypeName(scope const (char )[] name) nothrow pure
72
72
{
73
73
auto t = parseMimeTypeName(name);
74
74
return t.media.length && t.subtype.length && allSymbolsAreValid(t.media) && allSymbolsAreValid(t.subtype);
@@ -1185,7 +1185,7 @@ struct AssociationUpdateQuery
1185
1185
/**
1186
1186
* Apply query to $(D MimeAppsListFile).
1187
1187
*/
1188
- @safe void apply(MimeAppsListFile file) const
1188
+ @safe void apply(scope MimeAppsListFile file) const
1189
1189
{
1190
1190
foreach (op; _operations)
1191
1191
{
@@ -1234,7 +1234,7 @@ unittest
1234
1234
* $(D inilike.file.IniLikeReadException) if errors occured duting reading of file.
1235
1235
* $(B ErrnoException) if errors occured during file writing.
1236
1236
*/
1237
- @trusted void updateAssociations(string fileName, ref AssociationUpdateQuery query)
1237
+ @trusted void updateAssociations(string fileName, ref scope const AssociationUpdateQuery query)
1238
1238
{
1239
1239
MimeAppsListFile file;
1240
1240
if (fileName.exists) {
@@ -1258,7 +1258,7 @@ static if (isFreedesktop)
1258
1258
* Warning: $(RED Since this library is in development this function should be used with care.
1259
1259
* Developer can't guarantee yet that it will not damage your file associations settings.)
1260
1260
*/
1261
- @safe void updateAssociations(ref AssociationUpdateQuery query)
1261
+ @safe void updateAssociations(ref scope const AssociationUpdateQuery query)
1262
1262
{
1263
1263
foreach (fileName; writableMimeAppsListPaths ()) {
1264
1264
updateAssociations(fileName, query);
0 commit comments