File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -39,18 +39,18 @@ pub const Cron = struct {
39
39
40
40
var length : usize = undefined ;
41
41
if (total_field == 5 ) {
42
- std . mem . copy ( u8 , self .buf [0.. 2], "0 " );
43
- std . mem . copy ( u8 , self .buf [2.. ], cron_expr );
44
- std . mem . copy ( u8 , self .buf [cron_expr .len + 2 .. ], " *" );
42
+ @memcpy ( self .buf [0.. 2], "0 " );
43
+ @memcpy ( self .buf [2 .. 2 + cron_expr . len ], cron_expr );
44
+ @memcpy ( self .buf [cron_expr .len + 2 .. cron_expr . len + 2 + " *" .len ], " *" );
45
45
total_field += 2 ;
46
46
length = 2 + cron_expr .len + 2 ;
47
47
} else if (total_field == 6 ) {
48
- std . mem . copy ( u8 , self .buf [0.. 2], "0 " );
49
- std . mem . copy ( u8 , self .buf [2.. ], cron_expr );
48
+ @memcpy ( self .buf [0.. 2], "0 " );
49
+ @memcpy ( self .buf [2 .. 2 + cron_expr . len ], cron_expr );
50
50
total_field += 1 ;
51
51
length = 2 + cron_expr .len ;
52
52
} else {
53
- std . mem . copy ( u8 , self .buf [0.. ], cron_expr );
53
+ @memcpy ( self .buf [0.. cron_expr . len ], cron_expr );
54
54
length = cron_expr .len ;
55
55
}
56
56
You can’t perform that action at this time.
0 commit comments