square_calculator

Crates.iosquare_calculator
lib.rssquare_calculator
version0.1.1
sourcesrc
created_at2020-06-10 23:38:36.306596
updated_at2020-06-10 23:47:24.192266
descriptionSquare Calculator
homepagehttps://github.com/NisarAbbasi1978/Square_Calculator.git
repositoryhttps://github.com/NisarAbbasi1978/Square_Calculator.git
max_upload_size
id252542
size14,304
(NisarAbbasi1978)

documentation

README

Square Calculator

this is a demo rust library published on crates.io

to use this library you have to add following line in dependency section of cargo.toml

square_calculator = "0.1.1"

your cargo.toml file should look like this:

[package]
name = "square_calculator"
version = "0.1.1"
authors = ["N A Abbasi <nisar_abbasi@yahoo.com>"]
edition = "2018"

[dependencies]
square_calculator = "0.1.1"

In src/main.rs you can use like this:

use square_calculator;
fn main() {
    let (firstsq,secondsq) = square_calculator::square (10,12);
    println!("First square is {}",firstsq);
    println!("Second square is {}",secondsq);
}

following will also work:

use square_calculator::square;
fn main() {
    let (firstsq,secondsq) = square (10,12);
    println!("First square is {}",firstsq);
    println!("Second square is {}",secondsq);
}

now cargo run for results

Commit count: 5

cargo fmt