Initial commit

This commit is contained in:
Yash 2021-02-03 15:19:11 -06:00
commit 6bebbac9cd
No known key found for this signature in database
GPG Key ID: A794DA2529474BA5
5 changed files with 31 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

5
Cargo.lock generated Normal file
View File

@ -0,0 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "sandwich"
version = "0.1.0"

9
Cargo.toml Normal file
View File

@ -0,0 +1,9 @@
[package]
name = "sandwich"
version = "0.1.0"
authors = ["Yash <nerdstep710@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

1
inp.txt Normal file
View File

@ -0,0 +1 @@
Test file

15
src/main.rs Normal file
View File

@ -0,0 +1,15 @@
use std::fs;
use std::env;
fn main() {
let args: Vec<String> = env::args().collect();
if args.len() == 1 {
panic!("You must provide an argument!");
}
let filename = &args[1];
let contents = fs::read_to_string(filename).expect("Something went wrong reading the file");
println!("{}", contents);
}