Skip to content

Commit

Permalink
fixed some clippy warnings + suppressed useless lints
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jul 27, 2024
1 parent 4b3e1e0 commit 03b1842
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions editor/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ fn copy_binaries_pc(
}
for path in binary_paths {
if let Some(file_name) = path.file_name() {
match fs::copy(&path, &destination_folder.join(file_name)) {
match fs::copy(&path, destination_folder.join(file_name)) {
Ok(_) => {
Log::info(format!(
"{} was successfully copied to the {} folder.",
Expand Down Expand Up @@ -454,7 +454,7 @@ fn copy_binaries_android(
}
for path in binary_paths {
if let Some(file_name) = path.file_name() {
match fs::copy(&path, &destination_folder.join(file_name)) {
match fs::copy(&path, destination_folder.join(file_name)) {
Ok(_) => {
Log::info(format!(
"{} was successfully copied to the {} folder.",
Expand Down
1 change: 1 addition & 0 deletions editor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// These are useless.
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::inconsistent_struct_constructor)]
#![allow(clippy::mutable_key_type)]

#[macro_use]
extern crate lazy_static;
Expand Down
1 change: 1 addition & 0 deletions fyrox-animation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//! See [`Animation`] docs for more info.

#![warn(missing_docs)]
#![allow(clippy::doc_lazy_continuation)]

use crate::{
core::{
Expand Down
1 change: 1 addition & 0 deletions fyrox-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::from_over_into)]
#![allow(clippy::doc_lazy_continuation)]

#[macro_use]
extern crate memoffset;
Expand Down
1 change: 1 addition & 0 deletions fyrox-core/src/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,7 @@ impl Visit for String {
}

impl Visit for PathBuf {
#[allow(clippy::needless_borrows_for_generic_args)] // Fix your shit first before releasing.
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult {
let mut region = visitor.enter_region(name)?;

Expand Down
2 changes: 2 additions & 0 deletions fyrox-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::from_over_into)]
#![allow(clippy::approx_constant)]
#![allow(clippy::doc_lazy_continuation)]
#![allow(clippy::mutable_key_type)]

pub mod engine;
pub mod material;
Expand Down
2 changes: 1 addition & 1 deletion fyrox-impl/src/resource/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ impl Model {
let mut scene = Scene::new();
if let Some(filename) = path.as_ref().file_name() {
let root = scene.graph.get_root();
scene.graph[root].set_name(&filename.to_string_lossy());
scene.graph[root].set_name(filename.to_string_lossy());
}
fbx::load_to_scene(
&mut scene,
Expand Down
2 changes: 2 additions & 0 deletions fyrox-resource/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#![forbid(unsafe_code)]
#![allow(missing_docs)]
#![allow(clippy::doc_lazy_continuation)]
#![allow(clippy::mutable_key_type)]

use crate::{
core::{
Expand Down
2 changes: 2 additions & 0 deletions fyrox-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@
#![allow(clippy::new_without_default)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::doc_lazy_continuation)]
#![allow(clippy::mutable_key_type)]

pub use copypasta;
pub use fyrox_core as core;
Expand Down

0 comments on commit 03b1842

Please sign in to comment.