@@ -189,6 +189,7 @@ struct RedisValue {
189
189
string m_key;
190
190
}
191
191
192
+ @safe :
192
193
this (RedisDatabase db, string key) { m_db = db; m_key = key; }
193
194
194
195
/* * The database in which the key is stored.
@@ -394,7 +395,7 @@ struct RedisHash(T = string) {
394
395
void opIndexOpAssign (string op)(T value, string field) if (op == " +" ) { m_db.hincr(m_key, field, value); }
395
396
void opIndexOpAssign (string op)(T value, string field) if (op == " -" ) { m_db.hincr(m_key, field, - value); }
396
397
397
- int opApply (scope int delegate (string key, T value) del)
398
+ int opApply (scope int delegate (string key, T value) @safe del)
398
399
{
399
400
auto reply = m_db.hgetAll(m_key);
400
401
while (reply.hasNext()) {
@@ -407,7 +408,7 @@ struct RedisHash(T = string) {
407
408
}
408
409
409
410
410
- int opApply (scope int delegate (string key) del)
411
+ int opApply (scope int delegate (string key) @safe del)
411
412
{
412
413
auto reply = m_db.hkeys(m_key);
413
414
while (reply.hasNext()) {
@@ -525,7 +526,7 @@ struct RedisList(T = string) {
525
526
Dollar opSub (long off) { return Dollar(offset - off); }
526
527
}
527
528
528
- int opApply (scope int delegate (T) del)
529
+ int opApply (scope int delegate (T) @safe del)
529
530
{
530
531
foreach (v; this [0 .. $])
531
532
if (auto ret = del(v))
@@ -563,7 +564,7 @@ struct RedisSet(T = string) {
563
564
// long sinterStore(string destination, string[] keys...) { return request!long("SINTERSTORE", destination, keys); }
564
565
bool contains (T value) { return m_db.sisMember(m_key, value.toRedis()); }
565
566
566
- int opApply (scope int delegate (T value) del)
567
+ int opApply (scope int delegate (T value) @safe del)
567
568
{
568
569
foreach (m; m_db.smembers! string (m_key))
569
570
if (auto ret = del(m.fromRedis! T()))
0 commit comments