@@ -13,47 +13,47 @@ actor! {
13
13
#[ derive( Debug ) ]
14
14
pub struct Combiner {
15
15
/// The name of the product, for display.
16
- #[ clap ( value_name = "NAME" ) ]
16
+ #[ arg ( value_name = "NAME" ) ]
17
17
product_name: String = "Product" ,
18
18
19
19
/// The name of the package tarball.
20
- #[ clap ( value_name = "NAME" ) ]
20
+ #[ arg ( value_name = "NAME" ) ]
21
21
package_name: String = "package" ,
22
22
23
23
/// The directory under lib/ where the manifest lives.
24
- #[ clap ( value_name = "DIR" ) ]
24
+ #[ arg ( value_name = "DIR" ) ]
25
25
rel_manifest_dir: String = "packagelib" ,
26
26
27
27
/// The string to print after successful installation.
28
- #[ clap ( value_name = "MESSAGE" ) ]
28
+ #[ arg ( value_name = "MESSAGE" ) ]
29
29
success_message: String = "Installed." ,
30
30
31
31
/// Places to look for legacy manifests to uninstall.
32
- #[ clap ( value_name = "DIRS" ) ]
32
+ #[ arg ( value_name = "DIRS" ) ]
33
33
legacy_manifest_dirs: String = "" ,
34
34
35
35
/// Installers to combine.
36
- #[ clap ( value_name = "FILE,FILE" ) ]
36
+ #[ arg ( value_name = "FILE,FILE" ) ]
37
37
input_tarballs: String = "" ,
38
38
39
39
/// Directory containing files that should not be installed.
40
- #[ clap ( value_name = "DIR" ) ]
40
+ #[ arg ( value_name = "DIR" ) ]
41
41
non_installed_overlay: String = "" ,
42
42
43
43
/// The directory to do temporary work.
44
- #[ clap ( value_name = "DIR" ) ]
44
+ #[ arg ( value_name = "DIR" ) ]
45
45
work_dir: String = "./workdir" ,
46
46
47
47
/// The location to put the final image and tarball.
48
- #[ clap ( value_name = "DIR" ) ]
48
+ #[ arg ( value_name = "DIR" ) ]
49
49
output_dir: String = "./dist" ,
50
50
51
51
/// The profile used to compress the tarball.
52
- #[ clap ( value_name = "FORMAT" , default_value_t) ]
52
+ #[ arg ( value_name = "FORMAT" , default_value_t) ]
53
53
compression_profile: CompressionProfile ,
54
54
55
55
/// The formats used to compress the tarball
56
- #[ clap ( value_name = "FORMAT" , default_value_t) ]
56
+ #[ arg ( value_name = "FORMAT" , default_value_t) ]
57
57
compression_formats: CompressionFormats ,
58
58
}
59
59
}
@@ -94,7 +94,7 @@ impl Combiner {
94
94
let pkg_name =
95
95
input_tarball. trim_end_matches ( & format ! ( ".tar.{}" , compression. extension( ) ) ) ;
96
96
let pkg_name = Path :: new ( pkg_name) . file_name ( ) . unwrap ( ) ;
97
- let pkg_dir = Path :: new ( & self . work_dir ) . join ( & pkg_name) ;
97
+ let pkg_dir = Path :: new ( & self . work_dir ) . join ( pkg_name) ;
98
98
99
99
// Verify the version number.
100
100
let mut version = String :: new ( ) ;
@@ -114,9 +114,9 @@ impl Combiner {
114
114
// All we need to do is copy the component directory. We could
115
115
// move it, but rustbuild wants to reuse the unpacked package
116
116
// dir for OS-specific installers on macOS and Windows.
117
- let component_dir = package_dir. join ( & component) ;
117
+ let component_dir = package_dir. join ( component) ;
118
118
create_dir ( & component_dir) ?;
119
- copy_recursive ( & pkg_dir. join ( & component) , & component_dir) ?;
119
+ copy_recursive ( & pkg_dir. join ( component) , & component_dir) ?;
120
120
121
121
// Merge the component name.
122
122
writeln ! ( & components, "{}" , component) . context ( "failed to write new components" ) ?;
@@ -158,7 +158,7 @@ impl Combiner {
158
158
. input ( self . package_name )
159
159
. output ( path_to_str ( & output) ?. into ( ) )
160
160
. compression_profile ( self . compression_profile )
161
- . compression_formats ( self . compression_formats . clone ( ) ) ;
161
+ . compression_formats ( self . compression_formats ) ;
162
162
tarballer. run ( ) ?;
163
163
164
164
Ok ( ( ) )
0 commit comments