diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-11-14 21:31:27 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-11-14 21:31:27 +0200 |
commit | 03f499514b785446650d6e9c3938634b9ecbbf75 (patch) | |
tree | 3780fb3eed6f0f2c750e2a967093090c986eecb8 | |
parent | 90ab14dc424ec0172d114a6eac4452dd62e1b11d (diff) | |
download | pathdedup-03f499514b785446650d6e9c3938634b9ecbbf75.tar.gz |
dummy version
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Sponsored-by: author
-rw-r--r-- | Cargo.lock | 16 | ||||
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | src/main.rs | 9 |
3 files changed, 24 insertions, 2 deletions
diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..cf3f6b4 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,16 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "pathdedup" +version = "0.1.0" +dependencies = [ + "anyhow", +] @@ -6,3 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +anyhow = "1.0.75" diff --git a/src/main.rs b/src/main.rs index e7a11a9..7b7c4be 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,8 @@ -fn main() { - println!("Hello, world!"); +fn main() -> anyhow::Result<()> { + println!("{}", pathdedup(&std::env::var("PATH")?)); + Ok(()) +} + +fn pathdedup(path: &str) -> String { + path.into() } |