Browse Source

Remove some old TODO comments

tags/alpha-0.6.2
Manos Pitsidianakis 1 month ago
parent
commit
14663e46b9
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS. GPG Key ID: 73627C2F690DF710
19 changed files with 5 additions and 42 deletions
  1. +0
    -1
      melib/src/backends/maildir/backend.rs
  2. +0
    -7
      melib/src/email.rs
  3. +0
    -1
      melib/src/email/compose.rs
  4. +0
    -11
      melib/src/email/parser.rs
  5. +0
    -1
      melib/src/text_processing/wcwidth.rs
  6. +5
    -2
      src/components/mail/compose.rs
  7. +0
    -1
      src/components/mail/listing/compact.rs
  8. +0
    -1
      src/components/mail/listing/conversations.rs
  9. +0
    -1
      src/components/mail/listing/plain.rs
  10. +0
    -2
      src/components/mail/listing/thread.rs
  11. +0
    -1
      src/components/mail/view.rs
  12. +0
    -1
      src/components/mail/view/envelope.rs
  13. +0
    -3
      src/components/mail/view/html.rs
  14. +0
    -1
      src/components/mail/view/thread.rs
  15. +0
    -2
      src/components/notifications.rs
  16. +0
    -3
      src/components/utilities.rs
  17. +0
    -1
      src/components/utilities/layouts.rs
  18. +0
    -1
      src/components/utilities/widgets.rs
  19. +0
    -1
      src/plugins/backend.rs

+ 0
- 1
melib/src/backends/maildir/backend.rs View File

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

+ 0
- 7
melib/src/email.rs 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 {
&self.envelope
}

+ 0
- 1
melib/src/email/compose.rs View File

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

+ 0
- 11
melib/src/email/parser.rs View File

@ -1133,22 +1133,11 @@ pub mod encodings {
}
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((
terminated(take_until(" =?"), peek(preceded(tag(b" "), encoded_word))),
take_while(|_| true),
))(input)?;
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(

+ 0
- 1
melib/src/text_processing/wcwidth.rs View File

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

+ 5
- 2
src/components/mail/compose.rs View File

@ -135,9 +135,12 @@ impl ViewMode {
impl fmt::Display for Composer {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
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 {
write!(f, "composing")
}

+ 0
- 1
src/components/mail/listing/compact.rs View File

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

+ 0
- 1
src/components/mail/listing/conversations.rs View File

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

+ 0
- 1
src/components/mail/listing/plain.rs View File

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

+ 0
- 2
src/components/mail/listing/thread.rs View File

@ -666,7 +666,6 @@ impl ListingTrait for ThreadListing {
);
}
/* TODO: highlight selected entries */
self.highlight_line(
grid,
(
@ -1135,7 +1134,6 @@ impl Component for ThreadListing {
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
{
grid[(get_x(upper_left) - 1, mid)].set_ch(LIGHT_VERTICAL_AND_RIGHT);

+ 0
- 1
src/components/mail/view.rs View File

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

+ 0
- 1
src/components/mail/view/envelope.rs View File

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

+ 0
- 3
src/components/mail/view/html.rs View File

@ -115,7 +115,6 @@ impl HtmlView {
impl fmt::Display for HtmlView {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// TODO display subject/info
write!(f, "view")
}
}
@ -130,8 +129,6 @@ impl Component for HtmlView {
}
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");
if let Ok(binary) = binary {
let p = create_temp_file(&self.bytes, None, None, true);

+ 0
- 1
src/components/mail/view/thread.rs View File

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

+ 0
- 2
src/components/notifications.rs View File

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

+ 0
- 3
src/components/utilities.rs View File

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

+ 0
- 1
src/components/utilities/layouts.rs View File

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

+ 0
- 1
src/components/utilities/widgets.rs View File

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

+ 0
- 1
src/plugins/backend.rs View File

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

Loading…
Cancel
Save