File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ edition = "2021"
6
6
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
7
8
8
[lib ]
9
- proc_macro = true
9
+ proc-macro = true
10
10
11
11
[dependencies ]
12
12
proc-macro2 = " 1.0.81"
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ use crate::{
13
13
pub struct Argument {
14
14
pub ident : Ident ,
15
15
pub field : Option < syn:: Type > ,
16
- pub name : String ,
17
16
pub arg_type : ArgType ,
18
17
pub help : String ,
19
18
}
@@ -41,7 +40,6 @@ pub fn parse_arguments_attr(attrs: &[Attribute]) -> ArgumentsAttr {
41
40
42
41
pub fn parse_argument ( v : Variant ) -> Vec < Argument > {
43
42
let ident = v. ident ;
44
- let name = ident. to_string ( ) ;
45
43
let attributes = get_arg_attributes ( & v. attrs ) . unwrap ( ) ;
46
44
47
45
// Return early because we don't need to check the fields if it's not used.
@@ -94,7 +92,6 @@ pub fn parse_argument(v: Variant) -> Vec<Argument> {
94
92
Argument {
95
93
ident : ident. clone ( ) ,
96
94
field : field. clone ( ) ,
97
- name : name. clone ( ) ,
98
95
arg_type,
99
96
help : arg_help,
100
97
}
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ fn actions() {
286
286
fn apply ( & mut self , arg : Arg ) {
287
287
match arg {
288
288
Arg :: Message ( m) => {
289
- self . last_message = m . clone ( ) ;
289
+ self . last_message . clone_from ( & m ) ;
290
290
self . messages . push ( m) ;
291
291
}
292
292
Arg :: Send => self . send = true ,
@@ -617,6 +617,7 @@ fn empty_value() {
617
617
Val ( V ) ,
618
618
}
619
619
620
+ #[ allow( dead_code) ]
620
621
struct Settings { }
621
622
622
623
impl Options < Arg > for Settings {
You can’t perform that action at this time.
0 commit comments