Updated math lib and import in cargo toml file
This commit is contained in:
6
src/main.rs
Normal file
6
src/main.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
use math;
|
||||
|
||||
fn main() {
|
||||
let sum = math::sum(1, 2);
|
||||
println!("Sum number {}", sum)
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user