@@ -21,7 +21,7 @@ pub struct Directives {
21
21
pub runtime_inputs : Vec < Expr > ,
22
22
pub runtime_files : Vec < PathBuf > ,
23
23
pub nixpkgs_config : Option < Expr > ,
24
- pub raw : HashMap < String , Vec < String > > ,
24
+ pub all : HashMap < String , Vec < String > > ,
25
25
}
26
26
27
27
impl Directives {
@@ -31,7 +31,7 @@ impl Directives {
31
31
}
32
32
33
33
fn parse ( indicator : & str , source : & str ) -> Result < Self > {
34
- let parser = Parser :: new ( indicator) . context ( "could not construct a parser" ) ?;
34
+ let parser = Parser :: new ( indicator) . context ( "could not construct parser" ) ?;
35
35
let fields = parser. parse ( source) ;
36
36
37
37
Self :: from_directives ( fields)
@@ -54,7 +54,7 @@ impl Directives {
54
54
runtime_inputs,
55
55
runtime_files,
56
56
nixpkgs_config,
57
- raw : fields
57
+ all : fields
58
58
. iter ( )
59
59
. map ( |( k, v) | ( k. to_string ( ) , v. iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ) )
60
60
. collect ( ) ,
@@ -68,7 +68,7 @@ impl Directives {
68
68
match fields. get ( field) {
69
69
Some ( value) => {
70
70
if value. len ( ) != 1 {
71
- anyhow:: bail!( "multiple `{}` directives but need a single one" , field) ;
71
+ anyhow:: bail!( "multiple `{}` directives but need exactly one" , field) ;
72
72
}
73
73
74
74
Ok ( Some ( value[ 0 ] ) )
@@ -312,7 +312,7 @@ mod tests {
312
312
313
313
assert_eq ! (
314
314
Some ( & vec![ "other" . to_string( ) ] ) ,
315
- directives. raw . get( "other" )
315
+ directives. all . get( "other" )
316
316
)
317
317
}
318
318
0 commit comments