mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
janitor: manual cargo clippy fixes
Semi-random selection of clippy topics that were uncontroversial before:-). Leaves about 84 deduplicated issues in the code base according to clippy from nightly.
This commit is contained in:
parent
77c85aa703
commit
28b96ca6f6
25 changed files with 57 additions and 71 deletions
|
@ -1841,7 +1841,7 @@ fn generate_sub_component(
|
|||
code: Vec<String>| {
|
||||
let mut code = ["[[maybe_unused]] auto self = this;".into()]
|
||||
.into_iter()
|
||||
.chain(code.into_iter())
|
||||
.chain(code)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let mut else_ = "";
|
||||
|
@ -3323,8 +3323,8 @@ fn generate_type_aliases(file: &mut File, doc: &Document) {
|
|||
.filter(|(export_name, type_name)| export_name != type_name)
|
||||
.map(|(export_name, type_name)| {
|
||||
Declaration::TypeAlias(TypeAlias {
|
||||
old_name: ident(&type_name),
|
||||
new_name: ident(&export_name),
|
||||
old_name: ident(type_name),
|
||||
new_name: ident(export_name),
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
@ -2793,8 +2793,8 @@ fn generate_named_exports(doc: &Document) -> Vec<TokenStream> {
|
|||
})
|
||||
.filter(|(export_name, type_name)| export_name != type_name)
|
||||
.map(|(export_name, type_name)| {
|
||||
let type_id = ident(&type_name);
|
||||
let export_id = ident(&export_name);
|
||||
let type_id = ident(type_name);
|
||||
let export_id = ident(export_name);
|
||||
quote!(#type_id as #export_id)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue