Remove some old TODO comments

memfd
Manos Pitsidianakis 2020-08-26 00:11:51 +03:00
parent 4217839155
commit 14663e46b9
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
19 changed files with 5 additions and 42 deletions

View File

@ -452,7 +452,6 @@ impl MailBackend for MaildirType {
if let Some((k, v)) = if let Some((k, v)) =
index_lock.iter_mut().find(|(_, v)| *v.buf == pathbuf) index_lock.iter_mut().find(|(_, v)| *v.buf == pathbuf)
{ {
//TODO FIXME This doesn't make sense?
*v = pathbuf.clone().into(); *v = pathbuf.clone().into();
*k *k
} else { } else {

View File

@ -105,13 +105,6 @@ impl EnvelopeWrapper {
}) })
} }
pub fn update(&mut self, new_buffer: Vec<u8>) {
// TODO: Propagate error.
if let Ok(e) = EnvelopeWrapper::new(new_buffer) {
*self = e;
}
}
pub fn envelope(&self) -> &Envelope { pub fn envelope(&self) -> &Envelope {
&self.envelope &self.envelope
} }

View File

@ -90,7 +90,6 @@ impl str::FromStr for Draft {
impl Draft { impl Draft {
pub fn edit(envelope: &Envelope, bytes: &[u8]) -> Result<Self> { pub fn edit(envelope: &Envelope, bytes: &[u8]) -> Result<Self> {
let mut ret = Draft::default(); let mut ret = Draft::default();
//TODO: Inform user if error
for (k, v) in envelope.headers(&bytes).unwrap_or_else(|_| Vec::new()) { for (k, v) in envelope.headers(&bytes).unwrap_or_else(|_| Vec::new()) {
ret.headers.insert(k.try_into()?, v.into()); ret.headers.insert(k.try_into()?, v.into());
} }

View File

@ -1133,22 +1133,11 @@ pub mod encodings {
} }
pub fn ascii_token(input: &[u8]) -> IResult<&[u8], Vec<u8>> { pub fn ascii_token(input: &[u8]) -> IResult<&[u8], Vec<u8>> {
// TODO take_until used to be take_until1, check if this works
let (input, word) = alt(( let (input, word) = alt((
terminated(take_until(" =?"), peek(preceded(tag(b" "), encoded_word))), terminated(take_until(" =?"), peek(preceded(tag(b" "), encoded_word))),
take_while(|_| true), take_while(|_| true),
))(input)?; ))(input)?;
Ok((input, word.to_vec())) Ok((input, word.to_vec()))
/*
do_parse!(
word: alt_complete!(
terminated!(
take_until1!(" =?"),
peek!(preceded!(tag!(b" "), call!(encoded_word)))
) | take_while!(call!(|_| true))
) >> ({ word.into() })
)
*/
} }
pub fn phrase( pub fn phrase(

View File

@ -27,7 +27,6 @@
* Markus Kuhn -- 2001-09-08 -- public domain * Markus Kuhn -- 2001-09-08 -- public domain
*/ */
// TODO: Spacing widths
// Update to Unicode 12 // Update to Unicode 12
#[macro_export] #[macro_export]

View File

@ -135,9 +135,12 @@ impl ViewMode {
impl fmt::Display for Composer { impl fmt::Display for Composer {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
if self.reply_context.is_some() { if self.reply_context.is_some() {
write!(f, "reply: {:8}", &self.draft.headers()["Subject"]) write!(
f,
"reply: {}",
(&self.draft.headers()["Subject"]).trim_at_boundary(8)
)
} else { } else {
write!(f, "composing") write!(f, "composing")
} }

View File

@ -740,7 +740,6 @@ impl ListingTrait for CompactListing {
); );
} }
/* TODO: highlight selected entries */
self.highlight_line( self.highlight_line(
grid, grid,
( (

View File

@ -679,7 +679,6 @@ impl ListingTrait for ConversationsListing {
((0, 3 * top_idx), pos_dec(self.content.size(), (1, 1))), ((0, 3 * top_idx), pos_dec(self.content.size(), (1, 1))),
); );
/* TODO: highlight selected entries */
self.highlight_line( self.highlight_line(
grid, grid,
( (

View File

@ -571,7 +571,6 @@ impl ListingTrait for PlainListing {
); );
} }
/* TODO: highlight selected entries */
self.highlight_line( self.highlight_line(
grid, grid,
( (

View File

@ -666,7 +666,6 @@ impl ListingTrait for ThreadListing {
); );
} }
/* TODO: highlight selected entries */
self.highlight_line( self.highlight_line(
grid, grid,
( (
@ -1135,7 +1134,6 @@ impl Component for ThreadListing {
return; return;
} }
{ {
/* TODO: Move the box drawing business in separate functions */
if get_x(upper_left) > 0 && grid[(get_x(upper_left) - 1, mid)].ch() == VERT_BOUNDARY if get_x(upper_left) > 0 && grid[(get_x(upper_left) - 1, mid)].ch() == VERT_BOUNDARY
{ {
grid[(get_x(upper_left) - 1, mid)].set_ch(LIGHT_VERTICAL_AND_RIGHT); grid[(get_x(upper_left) - 1, mid)].set_ch(LIGHT_VERTICAL_AND_RIGHT);

View File

@ -156,7 +156,6 @@ impl Clone for MailView {
impl fmt::Display for MailView { impl fmt::Display for MailView {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
write!(f, "{}", MailView::DESCRIPTION) write!(f, "{}", MailView::DESCRIPTION)
} }
} }

View File

@ -60,7 +60,6 @@ pub struct EnvelopeView {
impl fmt::Display for EnvelopeView { impl fmt::Display for EnvelopeView {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
write!(f, "view mail") write!(f, "view mail")
} }
} }

View File

@ -115,7 +115,6 @@ impl HtmlView {
impl fmt::Display for HtmlView { impl fmt::Display for HtmlView {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
write!(f, "view") write!(f, "view")
} }
} }
@ -130,8 +129,6 @@ impl Component for HtmlView {
} }
if let UIEvent::Input(Key::Char('v')) = event { if let UIEvent::Input(Key::Char('v')) = event {
// TODO: Optional filter that removes outgoing resource requests (images and
// scripts)
let binary = query_default_app("text/html"); let binary = query_default_app("text/html");
if let Ok(binary) = binary { if let Ok(binary) = binary {
let p = create_temp_file(&self.bytes, None, None, true); let p = create_temp_file(&self.bytes, None, None, true);

View File

@ -938,7 +938,6 @@ impl ThreadView {
impl fmt::Display for ThreadView { impl fmt::Display for ThreadView {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
write!(f, "view thread") write!(f, "view thread")
} }
} }

View File

@ -35,7 +35,6 @@ pub struct XDGNotifications {
impl fmt::Display for XDGNotifications { impl fmt::Display for XDGNotifications {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
write!(f, "") write!(f, "")
} }
} }
@ -154,7 +153,6 @@ pub struct NotificationFilter {}
impl fmt::Display for NotificationFilter { impl fmt::Display for NotificationFilter {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
write!(f, "") write!(f, "")
} }
} }

View File

@ -77,7 +77,6 @@ pub struct Pager {
impl fmt::Display for Pager { impl fmt::Display for Pager {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display info
write!(f, "{}", Pager::DESCRIPTION) write!(f, "{}", Pager::DESCRIPTION)
} }
} }
@ -646,7 +645,6 @@ pub struct StatusBar {
impl fmt::Display for StatusBar { impl fmt::Display for StatusBar {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display info
write!(f, "status bar") write!(f, "status bar")
} }
} }
@ -1343,7 +1341,6 @@ impl Tabbed {
impl fmt::Display for Tabbed { impl fmt::Display for Tabbed {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display info
write!(f, "tabs") write!(f, "tabs")
} }
} }

View File

@ -33,7 +33,6 @@ pub struct HSplit {
impl fmt::Display for HSplit { impl fmt::Display for HSplit {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
Display::fmt(&self.top, f) Display::fmt(&self.top, f)
} }
} }

View File

@ -235,7 +235,6 @@ impl Component for Field {
} }
} }
UIEvent::InsertInput(Key::Ctrl('w')) => { UIEvent::InsertInput(Key::Ctrl('w')) => {
// FIXME: Use Unicode word-breaking algorithm.
/* Cut previous word */ /* Cut previous word */
if let Text(ref mut s, _) = self { if let Text(ref mut s, _) = self {
while s.as_str()[..s.cursor_pos()] while s.as_str()[..s.cursor_pos()]

View File

@ -29,7 +29,6 @@ use std::collections::BTreeMap;
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::{Arc, Mutex, RwLock}; use std::sync::{Arc, Mutex, RwLock};
// TODO replace with melib::Envelope after simplifying melib::Envelope's
// fields/interface/deserializing // fields/interface/deserializing
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
struct SimpleEnvelope { struct SimpleEnvelope {