civkit / civkit-node

CivKit Node
Other
65 stars 12 forks source link

Fix Mismatched types error on Main #114

Closed MarketMadi closed 10 months ago

MarketMadi commented 11 months ago

When running cargo build on main this error is appearing. As a developer/contributor, I need a working main so I can fork it and run tests so fixing this is important.

This can potentially be resolved by changing the credential_msg_byte in credentialgateway.rs to be mutable.

We could also refactor the function to receive an immutable reference.

error[E0308]: mismatched types
  --> src/credentialgateway.rs:89:114
   |
89 | ... = CredentialAuthenticationPayload::decode(&credential_msg_bytes...
   |       --------------------------------------- ^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
   |       |
   |       arguments to this function are incorrect
   |
   = note: expected mutable reference `&mut _`
                      found reference `&&std::string::String`
MarketMadi commented 10 months ago

Closing as error was resolved by removing cached code and resetting to master.