Merge branch 'xMAC94x/remove_cargo_check' into 'master'

remove `cargo check` as its already included in `cargo clippy`

See merge request veloren/veloren!1689
This commit is contained in:
Marcel 2021-01-14 14:29:04 +00:00
commit 0ce08906cb
4 changed files with 8 additions and 18 deletions

View File

@ -1,18 +1,10 @@
check:
extends: .recompile-branch
stage: check
script:
- ln -s /dockercache/cache-all target
- cargo check --locked
- cargo check --examples --locked
# cargo clippy is a superset of cargo check, so we don't check manually
code-quality:
extends: .recompile-branch
stage: check
script:
- ln -s /dockercache/cache-all target
- cargo clippy -- -D warnings
- cargo clippy --tests -- -D warnings
- cargo clippy --all-targets --locked -- -D warnings
- cargo fmt --all -- --check
security:

View File

@ -117,6 +117,7 @@ impl Server {
trace!("Stop connect_manager");
}
#[allow(clippy::eval_order_dependence)]
async fn loop_participant(&self, p: Participant) {
if let (Ok(cmd_out), Ok(file_out), Ok(cmd_in), Ok(file_in)) = (
p.open(15, Promises::ORDERED | Promises::CONSISTENCY).await,

View File

@ -14,6 +14,7 @@ pub fn event_handler(_args: TokenStream, item: TokenStream) -> TokenStream {
let fn_return = sig.output; // comma separated args
let out: proc_macro2::TokenStream = quote! {
#[allow(clippy::unnecessary_wraps)]
#[no_mangle]
pub fn #fn_name(intern__ptr: i32, intern__len: u32) -> i32 {
let input = ::veloren_plugin_rt::read_input(intern__ptr,intern__len).unwrap();

View File

@ -375,20 +375,16 @@ fn main() {
if is_camera {
focus.z += spd * scale;
samples_changed = true;
} else {
if (scale * 2.0).is_normal() {
scale *= 2.0;
}
} else if (scale * 2.0).is_normal() {
scale *= 2.0;
}
}
if win.is_key_down(minifb::Key::F) {
if is_camera {
focus.z -= spd * scale;
samples_changed = true;
} else {
if (scale / 2.0).is_normal() {
scale /= 2.0;
}
} else if (scale / 2.0).is_normal() {
scale /= 2.0;
}
}