Removed eprintln! in ftp file transfer causing break when on Windows

This commit is contained in:
veeso
2021-04-13 09:09:04 +02:00
parent 08b8946429
commit 6c6dadc4e7
6 changed files with 1 additions and 10 deletions

2
Cargo.lock generated
View File

@@ -1322,7 +1322,7 @@ dependencies = [
[[package]]
name = "termscp"
version = "0.4.1"
version = "0.4.2"
dependencies = [
"bitflags",
"bytesize",

View File

@@ -101,7 +101,6 @@ mod tests {
// Parse
let deserializer: ConfigSerializer = ConfigSerializer {};
let cfg = deserializer.deserialize(Box::new(toml_file));
println!("{:?}", cfg);
assert!(cfg.is_ok());
let cfg: UserConfig = cfg.ok().unwrap();
// Verify configuration
@@ -141,7 +140,6 @@ mod tests {
// Parse
let deserializer: ConfigSerializer = ConfigSerializer {};
let cfg = deserializer.deserialize(Box::new(toml_file));
println!("{:?}", cfg);
assert!(cfg.is_ok());
let cfg: UserConfig = cfg.ok().unwrap();
// Verify configuration

View File

@@ -228,7 +228,6 @@ impl FtpFileTransfer {
}),
})),
};
eprintln!("{:?};{:?}", is_dir, symlink);
let mut abs_path: PathBuf = PathBuf::from(path);
abs_path.push(file_name.as_str());
let abs_path: PathBuf = Self::resolve(abs_path.as_path());
@@ -1111,7 +1110,6 @@ mod tests {
// Pwd
assert_eq!(ftp.pwd().ok().unwrap(), PathBuf::from("/"));
// List dir
println!("{:?}", ftp.list_dir(PathBuf::from("/").as_path()));
let files: Vec<FsEntry> = ftp.list_dir(PathBuf::from("/").as_path()).ok().unwrap();
// There should be at least 1 file
assert!(files.len() > 0);
@@ -1130,7 +1128,6 @@ mod tests {
// Pwd
assert_eq!(ftp.pwd().ok().unwrap(), PathBuf::from("/"));
// List dir
println!("{:?}", ftp.list_dir(PathBuf::from("/").as_path()));
let files: Vec<FsEntry> = ftp.list_dir(PathBuf::from("/").as_path()).ok().unwrap();
// There should be at least 1 file
assert!(files.len() > 0);

View File

@@ -898,7 +898,6 @@ mod tests {
// Get dir
let host: Localhost = Localhost::new(PathBuf::from(tmpdir.path())).ok().unwrap();
let files: Vec<FsEntry> = host.list_dir();
println!("Entries {:?}", files);
// Verify files
let file_0: &FsEntry = files.get(0).unwrap();
match file_0 {
@@ -1122,7 +1121,6 @@ mod tests {
// Verify dir_dest contains foo.txt
let mut test_file_path: PathBuf = dir_dest.clone();
test_file_path.push("foo.txt");
println!("{:?}", host.scan_dir(tmpdir.path()).ok().unwrap());
assert!(host.stat(test_file_path.as_path()).is_ok());
}

View File

@@ -525,7 +525,6 @@ mod tests {
// Iterate keys
for key in client.iter_ssh_keys() {
let host: SshHost = client.get_ssh_key(key).ok().unwrap().unwrap();
println!("{:?}", host);
assert_eq!(host.0, String::from("192.168.1.31"));
assert_eq!(host.1, String::from("pi"));
let mut expected_key_path: PathBuf = key_path.clone();

View File

@@ -64,7 +64,6 @@ mod tests {
fn test_ui_layout_utils_draw_area_in() {
let area: Rect = Rect::new(0, 0, 1024, 512);
let child: Rect = draw_area_in(area, 75, 30);
println!("{:?}", child);
assert_eq!(child.x, 43);
assert_eq!(child.y, 63);
assert_eq!(child.width, 271);