fix clippy
This commit is contained in:
1 parent
a7736284c8
commit
9d19f4d204
4 files changed
+4
-4
No files matched your search
@@ -321,7 +321,7 @@ pub fn build_desktop(
|
||||
if !config.out_dir.is_dir() {
|
||||
create_dir_all(&config.out_dir)?;
|
||||
}
|
||||
copy(res_path, &config.out_dir.join(target_file))?;
|
||||
copy(res_path, config.out_dir.join(target_file))?;
|
||||
|
||||
// this code will copy all public file to the output dir
|
||||
if config.asset_dir.is_dir() {
|
||||
@@ -467,7 +467,6 @@ pub fn gen_page(config: &CrateConfig, serve: bool, skip_assets: bool) -> String
|
||||
String::from(include_str!("./assets/index.html"))
|
||||
};
|
||||
|
||||
|
||||
let resources = config.dioxus_config.web.resource.clone();
|
||||
|
||||
let mut style_list = resources.style.unwrap_or_default();
|
||||
|
||||
@@ -201,7 +201,7 @@ fn get_asset_root() -> Option<PathBuf> {
|
||||
|
||||
/// Get the mime type from a path-like string
|
||||
fn get_mime_from_path(trimmed: &Path) -> Result<&'static str> {
|
||||
if trimmed.ends_with(".svg") {
|
||||
if trimmed.extension().is_some_and(|ext| ext == "svg") {
|
||||
return Ok("image/svg+xml");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#[cfg(any(feature = "axum", feature = "warp", feature = "salvo"))]
|
||||
pub fn copy_assets() {
|
||||
#[cfg(all(
|
||||
debug_assertions,
|
||||
|
||||
@@ -109,7 +109,7 @@ pub fn server(args: proc_macro::TokenStream, s: TokenStream) -> TokenStream {
|
||||
let upper_cammel_case_name = Converter::new()
|
||||
.from_case(Case::Snake)
|
||||
.to_case(Case::UpperCamel)
|
||||
.convert(&sig.ident.to_string());
|
||||
.convert(sig.ident.to_string());
|
||||
args.struct_name = Some(Ident::new(&upper_cammel_case_name, sig.ident.span()));
|
||||
}
|
||||
let struct_name = args.struct_name.as_ref().unwrap();
|
||||
|
||||
Reference in new issue
Block a user