From 70a0ccb0a9692d9b59bdac40038b50bbe5cc8d12 Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 6 Dec 2019 02:01:59 -0800 Subject: [PATCH] Remove all warnings --- build.rs | 8 +++----- src/main.rs | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/build.rs b/build.rs index 5cd828f..9279e7c 100644 --- a/build.rs +++ b/build.rs @@ -1,7 +1,7 @@ use cc::Build; -use std::path::{PathBuf, Path}; -use std::fs::{ReadDir, read_dir}; +use std::path::{Path, PathBuf}; +use std::fs::read_dir; fn main() { println!("Running build script"); @@ -28,7 +28,7 @@ fn main() { }).collect(); for entry in c_files.iter() { - println!("C FILE: {}", entry.display()); + println!("Including C source file: {}", entry.display()); } Build::new() @@ -38,7 +38,5 @@ fn main() { .flag("-lslang") .compile("most"); - //println!("rustc-cdylib-link-arg=--verbose"); - //println!("cargo:rustc-link-search=/usr/lib"); println!("cargo:rustc-link-lib=dylib=slang"); } diff --git a/src/main.rs b/src/main.rs index 1bc91d5..1b26983 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,8 @@ -#[allow(non_camel_case_types, non_snake_case)] +#[allow(non_camel_case_types, non_snake_case, dead_code)] mod ffi; -use std::{env, ffi::CString}; fn main() { - println!("Hello, world!"); + println!("Printing most usage:"); unsafe { ffi::most_usage(); }