private_auth_state: &PrivateAuthState,
) -> Result<Value, Error> {
let (id_token_claims, userinfo_claims) =
- self.verify_authorization_code(&code, &private_auth_state)?;
+ self.verify_authorization_code(code, private_auth_state)?;
let mut data = serde_json::to_value(id_token_claims)?;
let result = if api_method.protected
&& rpcenv.env_type == RpcEnvironmentType::PUBLIC
{
- proxy_protected_request(api_method, parts, body, &peer).await
+ proxy_protected_request(api_method, parts, body, peer).await
} else {
handle_api_request(rpcenv, api_method, formatter, parts, body, uri_param).await
};
let result = if api_method.protected
&& rpcenv.env_type == RpcEnvironmentType::PUBLIC
{
- proxy_protected_request(api_method, parts, body, &peer).await
+ proxy_protected_request(api_method, parts, body, peer).await
} else {
handle_unformatted_api_request(rpcenv, api_method, parts, body, uri_param).await
};
<B as ToOwned>::Owned: Borrow<B>,
{
fn as_ref(&self) -> &B {
- &self
+ self
}
}
let (key, schema) = match key {
Some(key) => {
- let schema = self.schema.lookup(&key);
+ let schema = self.schema.lookup(key);
let key = match str_slice_to_range(&self.input, key) {
None => Cow::Owned(key.to_string()),
Some(range) => match &self.input {
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
- Error::Generic(e) => f.write_str(&e),
- Error::Decode(m, _e) => f.write_str(&m),
- Error::Ssl(m, _e) => f.write_str(&m),
+ Error::Generic(e) => f.write_str(e),
+ Error::Decode(m, _e) => f.write_str(m),
+ Error::Ssl(m, _e) => f.write_str(m),
Error::UnsupportedAlgorithm(a) => write!(f, "unsupported algorithm: '{a}'"),
Error::UnknownParameter(p) => write!(f, "unknown otpauth uri parameter: '{p}'"),
- Error::BadParameter(m, _e) => f.write_str(&m),
+ Error::BadParameter(m, _e) => f.write_str(m),
}
}
}