Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build issues #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

takumiSudo
Copy link

  1. Cedar-Agent Update:

    • Updated the version of cedar-agent to "0.2.0".
  2. Code Changes in api.rs:

    • Modified the code within the api.rs file to resolve type errors that were occurring during the build process.
    • During the initial build process cargo build, cedar-agent failed to compile due to a Type error in the tinytodo/src/api.rs code:

Original Code:

fn respond(msg: Result<impl Serialize, Error>) -> impl warp::Reply {
   match msg {
       Ok(msg) => Ok(warp::reply::json(&msg)),
       Err(error) => Ok(warp::reply::json(&ErrorMsg { error })),
   }
}

Refined Code:

fn respond(msg: Result<impl Serialize, Error>) -> impl warp::Reply {
    match msg {
        Ok(msg) => warp::reply::json(&msg),
        Err(error) => warp::reply::json(&ErrorMsg { error }),
    }
}

which removed the OK(...) wrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants