File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -12,21 +12,25 @@ pub fn pyckitup_init(project_name: PathBuf) -> anyhow::Result<()> {
12
12
project_name. display( )
13
13
) ;
14
14
std:: fs:: create_dir_all ( project_name. join ( "static" ) ) ?;
15
+ fn bytesref ( x : & [ u8 ] ) -> & [ u8 ] {
16
+ // hack to coerce to &[u8]
17
+ x
18
+ }
15
19
std:: fs:: write (
16
20
project_name. join ( "static/click.wav" ) ,
17
- include_bytes ! ( "../static/click.wav" ) ,
21
+ bytesref ( include_bytes ! ( "../static/click.wav" ) ) ,
18
22
) ?;
19
23
std:: fs:: write (
20
24
project_name. join ( "run.py" ) ,
21
- include_bytes ! ( "../examples/clock.py" ) ,
25
+ bytesref ( include_bytes ! ( "../examples/clock.py" ) ) ,
22
26
) ?;
23
27
std:: fs:: write (
24
28
project_name. join ( "common.py" ) ,
25
- include_bytes ! ( "../examples/common.py" ) ,
29
+ bytesref ( include_bytes ! ( "../examples/common.py" ) ) ,
26
30
) ?;
27
31
std:: fs:: write (
28
32
project_name. join ( ".gitignore" ) ,
29
- include_bytes ! ( "../include/gitignore" ) ,
33
+ bytesref ( include_bytes ! ( "../include/gitignore" ) ) ,
30
34
) ?;
31
35
println ! ( "Initialized. To run: `pyckitup run`" ) ;
32
36
You can’t perform that action at this time.
0 commit comments