mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Fix clippy issues, plus a few manual cleanups
* Run `cargo clippy --fix` * `BackendSelector` is easier to instantiate with auto `Default`
This commit is contained in:
parent
417eaeb38a
commit
5356fdcf89
57 changed files with 374 additions and 454 deletions
|
@ -46,7 +46,7 @@ fn widget_library() -> &'static [(&'static str, &'static BuiltinDirectory<'stati
|
|||
|
||||
fn process_style(cargo_manifest_dir: &Path, path: &Path) -> std::io::Result<String> {
|
||||
let library_files: Vec<PathBuf> = cargo_manifest_dir
|
||||
.join(&path)
|
||||
.join(path)
|
||||
.read_dir()?
|
||||
.filter_map(Result::ok)
|
||||
.filter(|entry| {
|
||||
|
@ -71,7 +71,7 @@ fn process_style(cargo_manifest_dir: &Path, path: &Path) -> std::io::Result<Stri
|
|||
format!(
|
||||
"&BuiltinFile {{path: r#\"{}\"# , contents: include_bytes!(concat!(env!(\"CARGO_MANIFEST_DIR\"), r#\"/{}\"#))}}",
|
||||
file.file_name().unwrap().to_string_lossy(),
|
||||
file.strip_prefix(&cargo_manifest_dir).unwrap().display()
|
||||
file.strip_prefix(cargo_manifest_dir).unwrap().display()
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
|
|
@ -105,7 +105,7 @@ fn load_component(component: &Rc<i_slint_compiler::object_tree::Component>) -> C
|
|||
"focus".into(),
|
||||
PropertyInfo {
|
||||
ty: Type::Function(Rc::new(Function {
|
||||
return_type: Type::Void.into(),
|
||||
return_type: Type::Void,
|
||||
args: vec![],
|
||||
arg_names: vec![],
|
||||
})),
|
||||
|
@ -117,7 +117,7 @@ fn load_component(component: &Rc<i_slint_compiler::object_tree::Component>) -> C
|
|||
"clear-focus".into(),
|
||||
PropertyInfo {
|
||||
ty: Type::Function(Rc::new(Function {
|
||||
return_type: Type::Void.into(),
|
||||
return_type: Type::Void,
|
||||
args: vec![],
|
||||
arg_names: vec![],
|
||||
})),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue