mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-24 11:58:32 +00:00
Remove redundant clone in new TextFilter
This commit is contained in:
parent
f1c87a1755
commit
fa3404fbb5
@ -17,8 +17,7 @@ impl TextFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new TextFilter with a custom filter.
|
/// Creates a new TextFilter with a custom filter.
|
||||||
pub fn new_with_filter(label: String, filter: String) -> Self {
|
pub fn new_with_filter(label: String, mut filter: String) -> Self {
|
||||||
let mut filter = filter.clone();
|
|
||||||
filter.push('\0');
|
filter.push('\0');
|
||||||
let ptr = filter.as_mut_ptr();
|
let ptr = filter.as_mut_ptr();
|
||||||
Self {
|
Self {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user