Skip to content

Commit

Permalink
rm useless move
Browse files Browse the repository at this point in the history
  • Loading branch information
vic1707 committed Nov 14, 2023
1 parent 762e31e commit 1dc36c7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/token/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,42 +47,42 @@ macro_rules! xprs_fn {

//// closure wraping ////
(wrap $function:expr, 0) => {
move |_| $function()
|_| $function()
};
(wrap $function:expr, 1) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0])
|args| $function(args[0])
};
(wrap $function:expr, 2) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0], args[1])
|args| $function(args[0], args[1])
};
(wrap $function:expr, 3) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0], args[1], args[2])
|args| $function(args[0], args[1], args[2])
};
(wrap $function:expr, 4) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0], args[1], args[2], args[3])
|args| $function(args[0], args[1], args[2], args[3])
};
(wrap $function:expr, 5) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0], args[1], args[2], args[3], args[4])
|args| $function(args[0], args[1], args[2], args[3], args[4])
};
(wrap $function:expr, 6) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0], args[1], args[2], args[3], args[4], args[5])
|args| $function(args[0], args[1], args[2], args[3], args[4], args[5])
};
(wrap $function:expr, 7) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0], args[1], args[2], args[3], args[4], args[5], args[6])
|args| $function(args[0], args[1], args[2], args[3], args[4], args[5], args[6])
};
(wrap $function:expr, 8) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])
|args| $function(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])
};
(wrap $function:expr, 9) => {
#[allow(clippy::indexing_slicing)]
move |args| $function(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8])
|args| $function(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8])
};
}

0 comments on commit 1dc36c7

Please sign in to comment.