Skip to content

Commit 7191696

Browse files
committed
datatypes
datatypes + workflow improved
1 parent 1af38ba commit 7191696

File tree

5 files changed

+46
-2
lines changed

5 files changed

+46
-2
lines changed

.github/workflows/rust.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,22 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616

17-
- name: Build Print
17+
- name: Build print
1818
run: |
1919
cd print/
2020
cargo build --verbose
2121
22-
- name: Test Print
22+
- name: Test print
2323
run: |
2424
cd print/
2525
cargo test --verbose
26+
27+
- name: Build datatypes
28+
run: |
29+
cd datatypes/
30+
cargo build --verbose
31+
32+
- name: Test datatypes
33+
run: |
34+
cd datatypes/
35+
cargo test --verbose

datatypes/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
/target/
4+
5+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
7+
Cargo.lock
8+
9+
# These are backup files generated by rustfmt
10+
**/*.rs.bk

datatypes/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "datatypes"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]

datatypes/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Basic DataTypes:
2+
3+
```
4+
$ cargo run
5+
```

datatypes/src/main.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
fn main() {
2+
let name = "UserOne";
3+
let age:u32 = 20;
4+
let company = "CompanyOne Pvt Limited";
5+
let isprogrammer = true;
6+
7+
println!("Name: {}", name);
8+
println!("Age: {}", age);
9+
println!("Company: {}", company);
10+
println!("Is he programmer??: {}", isprogrammer);
11+
}

0 commit comments

Comments
 (0)