remove std::dbg uses
parent
70e5949590
commit
93f3d6e230
|
@ -478,7 +478,7 @@ impl MaildirType {
|
|||
continue 'entries;
|
||||
}
|
||||
if path.is_dir() {
|
||||
let path_children = std::dbg!(recurse_folders(folders, &path));
|
||||
let path_children = recurse_folders(folders, &path);
|
||||
if let Ok(f) = MaildirFolder::new(
|
||||
path.to_str().unwrap().to_string(),
|
||||
path.file_name().unwrap().to_str().unwrap().to_string(),
|
||||
|
|
|
@ -42,21 +42,27 @@ pub mod dbg {
|
|||
}
|
||||
};
|
||||
($val:expr) => {
|
||||
{
|
||||
if cfg!(debug_assertions) {
|
||||
eprint!(
|
||||
"[{:?}] {}:{}_{}: ",
|
||||
std::thread::current()
|
||||
.name()
|
||||
.map(std::string::ToString::to_string)
|
||||
.unwrap_or_else(|| format!("{:?}", std::thread::current().id())),
|
||||
file!(),
|
||||
line!(),
|
||||
column!()
|
||||
);
|
||||
eprintln!("{} = {:?}", stringify!($val), $val);
|
||||
}
|
||||
$val
|
||||
// Use of `match` here is intentional because it affects the lifetimes
|
||||
// of temporaries - https://stackoverflow.com/a/48732525/1063961
|
||||
match $val {
|
||||
tmp => {
|
||||
eprint!(
|
||||
"[{:?}] {}:{}_{}: ",
|
||||
std::thread::current()
|
||||
.name()
|
||||
.map(std::string::ToString::to_string)
|
||||
.unwrap_or_else(|| format!("{:?}", std::thread::current().id())),
|
||||
file!(),
|
||||
line!(),
|
||||
column!()
|
||||
);
|
||||
eprintln!("{} = {:?}", stringify!(tmp), tmp);
|
||||
tmp
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$val
|
||||
}
|
||||
};
|
||||
($fmt:literal, $($arg:tt)*) => {
|
||||
|
|
|
@ -92,7 +92,7 @@ fn main() {
|
|||
/* Poll on all channels. Currently we have the input channel for stdin, watching events and the signal watcher. */
|
||||
chan_select! {
|
||||
receiver.recv() -> r => {
|
||||
match std::dbg!(r.unwrap()) {
|
||||
match debug!(r.unwrap()) {
|
||||
ThreadEvent::Input(Key::Ctrl('z')) => {
|
||||
state.switch_to_main_screen();
|
||||
//_thread_handler.join().expect("Couldn't join on the associated thread");
|
||||
|
|
|
@ -491,8 +491,8 @@ impl Account {
|
|||
}
|
||||
}
|
||||
debug!("didn't find {}", h);
|
||||
std::dbg!(&self.folders);
|
||||
std::dbg!(&self.collection.envelopes);
|
||||
debug!(&self.folders);
|
||||
debug!(&self.collection.envelopes);
|
||||
unreachable!()
|
||||
}
|
||||
pub fn thread_to_mail_mut(&mut self, h: ThreadHash, f: FolderHash) -> &mut Envelope {
|
||||
|
|
|
@ -130,8 +130,6 @@ impl UText {
|
|||
};
|
||||
self.cursor_dec();
|
||||
|
||||
self.content
|
||||
.drain(std::dbg!(offset..offset + graph_len))
|
||||
.count();
|
||||
self.content.drain(offset..offset + graph_len).count();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue