Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve clippy warnings #138

Merged
merged 1 commit into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/demo/src/tests/matmul.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![allow(clippy::many_single_char_names)]
#![allow(clippy::too_many_arguments)]

use std::time::Instant;

/// Code is derived Rayon's matmul example
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub fn hello() -> Result<(), ()> {
println!("你好,世界");
println!("สวัสดีชาวโลก");
println!("Chào thế giới");
let crab = vec![0xF0 as u8, 0x9F as u8, 0xA6 as u8, 0x80 as u8];
let crab = vec![0xF0_u8, 0x9F_u8, 0xA6_u8, 0x80_u8];
println!(
"Crab emoji: {}",
String::from_utf8(crab).unwrap_or_default()
Expand Down
2 changes: 1 addition & 1 deletion examples/httpd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern crate hermit_sys;
extern crate tiny_http;

fn main() {
let crab = vec![0xF0 as u8, 0x9F as u8, 0xA6 as u8, 0x80 as u8];
let crab = vec![0xF0_u8, 0x9F_u8, 0xA6_u8, 0x80_u8];
let text = format!(
"Hello from RustyHermit {}",
String::from_utf8(crab).unwrap_or_default()
Expand Down
3 changes: 3 additions & 0 deletions hermit-abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
//! [RustyHermit](https://github.com/hermitcore/libhermit-rs).

#![no_std]
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::result_unit_err)]

extern crate libc;

pub mod tcplistener;
Expand Down
5 changes: 2 additions & 3 deletions hermit-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ fn build_hermit(src_dir: &Path, target_dir_opt: Option<&Path>) {
cmd.arg("vga");
}

let mut rustflags = Vec::new();
rustflags.push("-Zmutable-noalias=no".to_string());
let mut rustflags = vec!["-Zmutable-noalias=no".to_string()];

#[cfg(feature = "instrument")]
{
Expand Down Expand Up @@ -226,7 +225,7 @@ fn build() {
#[cfg(all(not(feature = "rustc-dep-of-std"), feature = "with_submodule"))]
fn build() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let target_dir = out_dir.clone().join("target");
let target_dir = out_dir.join("target");
let src_dir = env::current_dir()
.unwrap()
.parent()
Expand Down