Skip to content

Commit

Permalink
Extraced API into diffrent crate
Browse files Browse the repository at this point in the history
  • Loading branch information
Canvas02 committed Jan 14, 2022
1 parent 28449ac commit 94461a0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
File renamed without changes.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[workspace]
members = ["paste_rs-cli", "paste_rs_api"]

[profile.release]
lto = true
opt-level = 3
13 changes: 0 additions & 13 deletions paste_rs-cli/.gitignore

This file was deleted.

7 changes: 1 addition & 6 deletions paste_rs-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,5 @@ edition = "2021"
[dependencies]
clap = { version = "3.0", features = ["derive"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
# paste_rs-cli = { path = "../paste-rs_api" }
paste_rs_api = "0.1.0"
# directories = "4.0"

[profile.release]
lto = true
opt-level = 3
incremental = true
4 changes: 2 additions & 2 deletions paste_rs-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// TODO: implement cache
// mod cache;

use crate::paste::Url;
use clap::{AppSettings, Parser, Subcommand};
use paste_rs_api::Url;
use std::fs;

#[tokio::main]
Expand Down Expand Up @@ -60,7 +60,7 @@ async fn main() {
}
};

let url = match paste::new_paste(data).await {
let url = match paste_rs_api::new_paste(data).await {
Ok(res) => res,
Err(err) => {
eprintln!("ERROR: {:#?}", err);
Expand Down

0 comments on commit 94461a0

Please sign in to comment.