File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1010use std:: env;
1111use std:: fs:: File ;
1212use std:: io:: { self , Cursor , Read } ;
13- use std:: path:: PathBuf ;
13+ use std:: path:: { Path , PathBuf } ;
1414use std:: process:: ExitCode ;
1515
1616use clap:: Parser ;
@@ -94,7 +94,7 @@ fn validate_uri(dest: &str) -> Result<Uri, String> {
9494
9595/// Read input data from a file or stdin.
9696/// Note: Copy mode (-c) is effectively always-on since IPP requires full data upload.
97- fn read_input ( path : & PathBuf ) -> Result < Vec < u8 > , io:: Error > {
97+ fn read_input ( path : & Path ) -> Result < Vec < u8 > , io:: Error > {
9898 let path_str = path. to_string_lossy ( ) ;
9999 if path_str == "-" {
100100 let mut data = Vec :: new ( ) ;
@@ -199,7 +199,7 @@ fn send_print_job(
199199 Ok ( job_id)
200200}
201201
202- fn do_lp ( args : Args ) -> Result < ( ) , String > {
202+ fn do_lp ( mut args : Args ) -> Result < ( ) , String > {
203203 // Get and validate destination
204204 let dest = get_destination ( & args) ?;
205205 let uri = validate_uri ( & dest) ?;
@@ -208,7 +208,7 @@ fn do_lp(args: Args) -> Result<(), String> {
208208 let files: Vec < PathBuf > = if args. files . is_empty ( ) {
209209 vec ! [ PathBuf :: from( "-" ) ]
210210 } else {
211- args. files . clone ( )
211+ std :: mem :: take ( & mut args. files )
212212 } ;
213213
214214 // Process each file
You can’t perform that action at this time.
0 commit comments