@@ -37,6 +37,7 @@ pub fn create_file(path: &Path) -> crate::Result<BufWriter<File>> {
3737
3838/// Makes a symbolic link to a directory.
3939#[ cfg( unix) ]
40+ #[ allow( dead_code) ]
4041fn symlink_dir ( src : & Path , dst : & Path ) -> io:: Result < ( ) > {
4142 std:: os:: unix:: fs:: symlink ( src, dst)
4243}
@@ -49,6 +50,7 @@ fn symlink_dir(src: &Path, dst: &Path) -> io::Result<()> {
4950
5051/// Makes a symbolic link to a file.
5152#[ cfg( unix) ]
53+ #[ allow( dead_code) ]
5254fn symlink_file ( src : & Path , dst : & Path ) -> io:: Result < ( ) > {
5355 std:: os:: unix:: fs:: symlink ( src, dst)
5456}
@@ -87,6 +89,7 @@ pub fn copy_file(from: impl AsRef<Path>, to: impl AsRef<Path>) -> crate::Result<
8789/// parent directories of the destination path as necessary. Fails if the
8890/// source path is not a directory or doesn't exist, or if the destination path
8991/// already exists.
92+ #[ allow( dead_code) ]
9093pub fn copy_dir ( from : & Path , to : & Path ) -> crate :: Result < ( ) > {
9194 if !from. exists ( ) {
9295 return Err ( crate :: Error :: GenericError ( format ! (
@@ -174,22 +177,6 @@ pub fn print_finished(bundles: &[crate::bundle::Bundle]) -> crate::Result<()> {
174177 Ok ( ( ) )
175178}
176179
177- /// Prints a message to stderr, in the same format that `cargo` uses,
178- /// indicating that we have finished the the given signatures.
179- pub fn print_signed_updater_archive ( output_paths : & [ PathBuf ] ) -> crate :: Result < ( ) > {
180- let pluralised = if output_paths. len ( ) == 1 {
181- "updater archive"
182- } else {
183- "updater archives"
184- } ;
185- let msg = format ! ( "{} {} at:" , output_paths. len( ) , pluralised) ;
186- print_progress ( "Signed" , & msg) ?;
187- for path in output_paths {
188- println ! ( " {}" , path. display( ) ) ;
189- }
190- Ok ( ( ) )
191- }
192-
193180/// Prints a formatted bundle progress to stderr.
194181fn print_progress ( step : & str , msg : & str ) -> crate :: Result < ( ) > {
195182 let mut output = StandardStream :: stderr ( ColorChoice :: Always ) ;
@@ -202,6 +189,7 @@ fn print_progress(step: &str, msg: &str) -> crate::Result<()> {
202189}
203190
204191/// Prints a warning message to stderr, in the same format that `cargo` uses.
192+ #[ allow( dead_code) ]
205193pub fn print_warning ( message : & str ) -> crate :: Result < ( ) > {
206194 let mut output = StandardStream :: stderr ( ColorChoice :: Always ) ;
207195 let _ = output. set_color ( ColorSpec :: new ( ) . set_fg ( Some ( Color :: Yellow ) ) . set_bold ( true ) ) ;
@@ -223,26 +211,6 @@ pub fn print_info(message: &str) -> crate::Result<()> {
223211 Ok ( ( ) )
224212}
225213
226- /// Prints an error to stderr, in the same format that `cargo` uses.
227- pub fn print_error ( error : & anyhow:: Error ) -> crate :: Result < ( ) > {
228- let mut output = StandardStream :: stderr ( ColorChoice :: Always ) ;
229- let _ = output. set_color ( ColorSpec :: new ( ) . set_fg ( Some ( Color :: Red ) ) . set_bold ( true ) ) ;
230- write ! ( output, "error:" ) ?;
231- output. reset ( ) ?;
232- let _ = output. set_color ( ColorSpec :: new ( ) . set_bold ( true ) ) ;
233- writeln ! ( output, " {}" , error) ?;
234- output. reset ( ) ?;
235- for cause in error. chain ( ) . skip ( 1 ) {
236- writeln ! ( output, " Caused by: {}" , cause) ?;
237- }
238- // Add Backtrace once its stable.
239- // if let Some(backtrace) = error.backtrace() {
240- // writeln!(output, "{:?}", backtrace)?;
241- // }
242- output. flush ( ) ?;
243- std:: process:: exit ( 1 )
244- }
245-
246214pub fn execute_with_verbosity ( cmd : & mut Command , settings : & Settings ) -> crate :: Result < ( ) > {
247215 let stdio_config = if settings. is_verbose ( ) {
248216 Stdio :: piped
0 commit comments