Skip to content

Commit 04d81a7

Browse files
test: remove unnecessary assignment
1 parent 9e15b1d commit 04d81a7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ pub fn test_closure() -> Closure {
6363

6464
#[php_function]
6565
pub fn test_closure_once(a: String) -> Closure {
66-
let example = a.clone();
67-
Closure::wrap_once(Box::new(move || example) as Box<dyn FnOnce() -> String>)
66+
Closure::wrap_once(Box::new(move || a) as Box<dyn FnOnce() -> String>)
6867
}
6968

7069
#[php_function]

0 commit comments

Comments
 (0)