summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzwPapEr <zw.paper@gmail.com>2020-04-07 13:49:57 +0800
committerAbin Simon <abinsimon10@gmail.com>2020-04-07 12:25:11 +0530
commit04129e8624ebfc516a921dc2b443d3ba0c302973 (patch)
treebaa2136d306600118806218c36b77e17000dd61a
parenta017a3d0549aa4673555b51603b7fa5c1e5d49a9 (diff)
*: :art: add newline to each print error
-rw-r--r--src/core.rs4
-rw-r--r--src/meta/mod.rs12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core.rs b/src/core.rs
index 57f653d..16aaf8f 100644
--- a/src/core.rs
+++ b/src/core.rs
@@ -85,7 +85,7 @@ impl Core {
let mut meta = match Meta::from_path(&path) {
Ok(meta) => meta,
Err(err) => {
- print_error!("cannot access '{}': {}", path.display(), err);
+ print_error!("lsd: {}: {}\n", path.display(), err);
continue;
}
};
@@ -101,7 +101,7 @@ impl Core {
meta_list.push(meta);
}
Err(err) => {
- print_error!("cannot access '{}': {}", path.display(), err);
+ print_error!("lsd: {}: {}\n", path.display(), err);
continue;
}
};
diff --git a/src/meta/mod.rs b/src/meta/mod.rs
index 2ecc472..b29a57a 100644
--- a/src/meta/mod.rs
+++ b/src/meta/mod.rs
@@ -69,7 +69,7 @@ impl Meta {
let entries = match self.path.read_dir() {
Ok(entries) => entries,
Err(err) => {
- print_error!("cannot access '{}': {}", self.path.display(), err);
+ print_error!("lsd: {}: {}\n", self.path.display(), err);
return Ok(None);
}
};
@@ -116,7 +116,7 @@ impl Meta {
let mut entry_meta = match Self::from_path(&path) {
Ok(res) => res,
Err(err) => {
- print_error!("cannot access '{}': {}", path.display(), err);
+ print_error!("lsd: {}: {}\n", path.display(), err);
continue;
}
};
@@ -124,7 +124,7 @@ impl Meta {
match entry_meta.recurse_into(depth - 1, display, ignore_globs) {
Ok(content) => entry_meta.content = content,
Err(err) => {
- print_error!("cannot access '{}': {}", path.display(), err);
+ print_error!("lsd: {}: {}\n", path.display(), err);
continue;
}
};
@@ -162,7 +162,7 @@ impl Meta {
let metadata = match metadata {
Ok(meta) => meta,
Err(err) => {
- print_error!("cannot access '{}': {}", path.display(), err);
+ print_error!("lsd: {}: {}\n", path.display(), err);
return 0;
}
};
@@ -175,7 +175,7 @@ impl Meta {
let entries = match path.read_dir() {
Ok(entries) => entries,
Err(err) => {
- print_error!("cannot access '{}': {}", path.display(), err);
+ print_error!("lsd: {}: {}\n", path.display(), err);
return size;
}
};
@@ -183,7 +183,7 @@ impl Meta {
let path = match entry {
Ok(entry) => entry.path(),
Err(err) => {
- print_error!("cannot access '{}': {}", path.display(), err);
+ print_error!("lsd: {}: {}\n", path.display(), err);
continue;
}
};