@@ -353,7 +353,8 @@ fn try_main() -> MainResult<i32> {
353
353
return Ok ( 0 ) ;
354
354
}
355
355
356
- // Take the arguments and work out what our input is going to be. Primarily, this gives us the content, a user-friendly name, and a cache-friendly ID.
356
+ // Take the arguments and work out what our input is going to be.
357
+ // Primarily, this gives us the content, a user-friendly name, and a cache-friendly ID.
357
358
// These three are just storage for the borrows we'll actually use.
358
359
let script_name: String ;
359
360
let script_path: PathBuf ;
@@ -371,11 +372,11 @@ fn try_main() -> MainResult<i32> {
371
372
372
373
let mut body = String :: new ( ) ;
373
374
file. read_to_string ( & mut body) ?;
375
+ content = body;
374
376
375
377
let mtime = platform:: file_last_modified ( & file) ;
376
378
377
379
script_path = std:: env:: current_dir ( ) ?. join ( path) ;
378
- content = body;
379
380
380
381
Input :: File ( & script_name, & script_path, & content, mtime)
381
382
}
@@ -741,9 +742,6 @@ struct PackageMetadata {
741
742
/// Last-modified timestamp for script file.
742
743
modified : Option < u128 > ,
743
744
744
- /// Template used.
745
- template : Option < String > ,
746
-
747
745
/// Was the script compiled in debug mode?
748
746
debug : bool ,
749
747
@@ -801,17 +799,15 @@ fn decide_action_for(
801
799
} ;
802
800
803
801
let input_meta = {
804
- let ( path, mtime, template ) = match * input {
802
+ let ( path, mtime) = match * input {
805
803
Input :: File ( _, path, _, mtime) => {
806
- ( Some ( path. to_string_lossy ( ) . into_owned ( ) ) , Some ( mtime) , None )
804
+ ( Some ( path. to_string_lossy ( ) . into_owned ( ) ) , Some ( mtime) )
807
805
}
808
- Input :: Expr ( _, template) => ( None , None , template) ,
809
- Input :: Loop ( ..) => ( None , None , None ) ,
806
+ _ => ( None , None )
810
807
} ;
811
808
PackageMetadata {
812
809
path,
813
810
modified : mtime,
814
- template : template. map ( Into :: into) ,
815
811
debug,
816
812
deps,
817
813
prelude,
@@ -910,7 +906,7 @@ fn get_pkg_metadata_path<P>(pkg_path: P) -> PathBuf
910
906
where
911
907
P : AsRef < Path > ,
912
908
{
913
- pkg_path. as_ref ( ) . join ( consts :: METADATA_FILE )
909
+ pkg_path. as_ref ( ) . join ( "metadata.json" )
914
910
}
915
911
916
912
/**
0 commit comments