Remove redundant clone in new TextFilter

This commit is contained in:
dbr 2022-10-05 14:52:09 +10:30
parent f1c87a1755
commit fa3404fbb5

View File

@ -17,8 +17,7 @@ impl TextFilter {
}
/// Creates a new TextFilter with a custom filter.
pub fn new_with_filter(label: String, filter: String) -> Self {
let mut filter = filter.clone();
pub fn new_with_filter(label: String, mut filter: String) -> Self {
filter.push('\0');
let ptr = filter.as_mut_ptr();
Self {