~jheckt/Basket

28ef007f986761d6f76dcafe55ba70011a9d827c — turnipsoup 1 year, 3 months ago 6923667
remove quotes from string rust version
5 files changed, 8 insertions(+), 4 deletions(-)

D rust-version/.gitignore
A rust-version/client/.gitignore
R rust-version/{Cargo.lock => client/Cargo.lock}
R rust-version/{Cargo.toml => client/Cargo.toml}
R rust-version/{src/main.rs => client/src/main.rs}
D rust-version/.gitignore => rust-version/.gitignore +0 -1
@@ 1,1 0,0 @@
/target

A rust-version/client/.gitignore => rust-version/client/.gitignore +1 -0
@@ 0,0 1,1 @@
target/*

R rust-version/Cargo.lock => rust-version/client/Cargo.lock +0 -0
R rust-version/Cargo.toml => rust-version/client/Cargo.toml +0 -0
R rust-version/src/main.rs => rust-version/client/src/main.rs +7 -3
@@ 56,11 56,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Print the response JSON

    if mode == "get" {
        println!("{}",res["data"]["value"] );

        // Remove the quotes in the string that serde leaves in the Value() object
        let clndata = str::replace(&res["data"]["value"].to_string(), '"', "");
        println!("{}", clndata);
    }

     if mode == "set" {
        println!("{}",res["data"] );
    if mode == "set" {
        let clndata = str::replace(&res["data"].to_string(), '"', "");
        println!("{}",clndata);
    }
    
    Ok(())