File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,7 @@ pub fn topo(_attrs: TokenStream, input: TokenStream) -> TokenStream {
57
57
58
58
for attr in tmp {
59
59
match attr. parse_meta ( ) {
60
- Ok ( syn:: Meta :: NameValue ( syn:: MetaNameValue { ref ident, .. } ) )
61
- if ident. to_string ( ) == "doc" =>
62
- {
60
+ Ok ( syn:: Meta :: NameValue ( syn:: MetaNameValue { ref ident, .. } ) ) if * ident == "doc" => {
63
61
doc_attrs. push ( attr) ;
64
62
}
65
63
_ => input_fn. attrs . push ( attr) ,
@@ -99,9 +97,9 @@ fn docs_fn_signature(input_fn: &syn::ItemFn) -> TokenStream2 {
99
97
let doc_fn_sig = syn:: ItemFn {
100
98
attrs : vec ! [ ] ,
101
99
vis : syn:: Visibility :: Inherited ,
102
- constness : input_fn. constness . clone ( ) ,
103
- asyncness : input_fn. asyncness . clone ( ) ,
104
- unsafety : input_fn. unsafety . clone ( ) ,
100
+ constness : input_fn. constness ,
101
+ asyncness : input_fn. asyncness ,
102
+ unsafety : input_fn. unsafety ,
105
103
abi : input_fn. abi . clone ( ) ,
106
104
ident : input_fn. ident . clone ( ) ,
107
105
decl : input_fn. decl . clone ( ) ,
Original file line number Diff line number Diff line change 53
53
std:: {
54
54
any:: { Any , TypeId } ,
55
55
cell:: RefCell ,
56
- collections:: HashMap ,
56
+ collections:: { hash_map :: DefaultHasher , HashMap } ,
57
57
hash:: { Hash , Hasher } ,
58
58
ops:: Deref ,
59
59
rc:: Rc ,
@@ -158,7 +158,7 @@ impl Eq for Point {}
158
158
impl Point {
159
159
fn id ( & self ) -> Id {
160
160
// FIXME probably need a better hash function?
161
- let mut hasher = std :: collections :: hash_map :: DefaultHasher :: new ( ) ;
161
+ let mut hasher = DefaultHasher :: new ( ) ;
162
162
self . path . hash ( & mut hasher) ;
163
163
self . prev_sibling . hash ( & mut hasher) ;
164
164
Id ( hasher. finish ( ) )
@@ -313,7 +313,7 @@ mod tests {
313
313
fn clone ( first : & Point ) -> Point {
314
314
Point {
315
315
path : first. path . clone ( ) ,
316
- prev_sibling : first. prev_sibling . clone ( ) ,
316
+ prev_sibling : first. prev_sibling ,
317
317
env : first. env . clone ( ) ,
318
318
}
319
319
}
You can’t perform that action at this time.
0 commit comments