fn remove_comment(&mut self, description: Option<&str>, text: Option<&str>) {
        self.frames_vec_mut().retain(|frame| {
            if frame.id() == "COMM" {
                match *frame.content() {
                    Content::Comment(ref com) => {
                        let descr_match = description.map(|v| v == com.description).unwrap_or(true);
                        let text_match = text.map(|v| v == com.text).unwrap_or(true);
                        // True if we want to keep the frame.
                        !(descr_match && text_match)
                    }
                    _ => {
                        // A COMM frame must always have content of the Comment type. Remove frames
                        // that do not fit this requirement.
                        false
                    }
                }
            } else {
                true
            }
        });
    }
/// Removes the comment (COMM) with the specified key and value.
///
/// A key or value may be `None` to specify a wildcard value.
///
/// # Example
/// ```
/// use id3::{Tag, TagLike};
/// use id3::frame::Comment;
///
/// let mut tag = Tag::new();
///
/// tag.add_comment(Comment {
///     lang: "eng".to_string(),
///     description: "key1".to_string(),
///     text: "value1".to_string(),
/// });
/// tag.add_comment(Comment {
///     lang: "eng".to_string(),
///     description: "key2".to_string(),
///     text: "value2".to_string(),
/// });
/// assert_eq!(tag.comments().count(), 2);
///
/// tag.remove_comment(Some("key1"), None);
/// assert_eq!(tag.comments().count(), 1);
///
/// tag.remove_comment(None, Some("value2"));
/// assert_eq!(tag.comments().count(), 0);
/// ```
Removes the comment (COMM) with the specified key and value.
A key or value may be `None` to specify a wildcard value.
Removes the comment ( COMM ) with the specified key and value . A key or value may be ` None ` to specify a wildcard value .
fn remove_comment(&mut self, description: Option<&str>, text: Option<&str>) {
        self.frames_vec_mut().retain(|frame| {
            if frame.id() == "COMM" {
                match *frame.content() {
                    Content::Comment(ref com) => {
                        let descr_match = description.map(|v| v == com.description).unwrap_or(true);
                        let text_match = text.map(|v| v == com.text).unwrap_or(true);
                        // True if we want to keep the frame.
                        !(descr_match && text_match)
                    }
                    _ => {
                        // A COMM frame must always have content of the Comment type. Remove frames
                        // that do not fit this requirement.
                        false
                    }
                }
            } else {
                true
            }
        });
    }
fn remove_comment ( & mut self , description : Option < & str > , text : Option < & str > ) { self . frames_vec_mut ( ) . retain ( | frame | { if frame . id ( ) == " " { match * frame . content ( ) { Content :: Comment ( ref com ) => { let descr_match = description . map ( | v | v == com . description ) . unwrap_or ( true ) ; let text_match = text . map ( | v | v == com . text ) . unwrap_or ( true ) ; // True if we want to keep the frame. ! ( descr_match && text_match ) } _ => { // A COMM frame must always have content of the Comment type. Remove frames // that do not fit this requirement. false } } } else { true } } ) ; }
Removes the comment (COMM) with the specified key and value.
Removes the comment ( COMM ) with the specified key and value .
&mut self
description
Option<&str>
text
Option<&str>
&mut self
description
Option<&str>
text
Option<&str>
example
```
use id3::{Tag, TagLike};
use id3::frame::Comment.

let mut tag = Tag::new().

tag.add_comment(Comment {
lang: "eng".to_string(),
description: "key1".to_string(),
text: "value1".to_string(),
});
tag.add_comment(Comment {
lang: "eng".to_string(),
description: "key2".to_string(),
text: "value2".to_string(),
});
assert_eq!(tag.comments().count(), 2).

tag.remove_comment(Some("key1"), None);
assert_eq!(tag.comments().count(), 1).

tag.remove_comment(None, Some("value2"));
assert_eq!(tag.comments().count(), 0);
```
` ` ` use id3 :: { Tag TagLike } ; use id3 :: frame :: Comment . let mut tag = Tag :: new () . tag . add_comment ( Comment { lang : " eng " . to_string () description : " key1 " . to_string () text : " value1 " . to_string () } ) ; tag . add_comment ( Comment { lang : " eng " . to_string () description : " key2 " . to_string () text : " value2 " . to_string () } ) ; assert_eq! ( tag . comments () . count () 2 ) . tag . remove_comment ( Some ( " key1 " ) None ) ; assert_eq! ( tag . comments () . count () 1 ) . tag . remove_comment ( None Some ( " value2 " )) ; assert_eq! ( tag . comments () . count () 0 ) ; ` ` `