Updated math lib and import in cargo toml file

This commit is contained in:
2020-08-20 16:02:30 +07:00
parent 0ae0b214bc
commit cc6b0c38db
5 changed files with 17 additions and 8 deletions

6
src/main.rs Normal file
View File

@@ -0,0 +1,6 @@
use math;
fn main() {
let sum = math::sum(1, 2);
println!("Sum number {}", sum)
}

View File

@@ -1,3 +1,4 @@
#[allow(dead_code)]
pub fn set_panic_hook() {
// When the `console_error_panic_hook` feature is enabled, we can call the
// `set_panic_hook` function at least once during initialization, and then
@@ -7,4 +8,4 @@ pub fn set_panic_hook() {
// https://github.com/rustwasm/console_error_panic_hook#readme
#[cfg(feature = "console_error_panic_hook")]
console_error_panic_hook::set_once();
}
}