We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a1249f commit cd03a58Copy full SHA for cd03a58
examples/oauth_cli/src/main.rs
@@ -140,12 +140,10 @@ impl OAuthCli {
140
let cli = Self { client, restored: false, session_file };
141
142
if let Err(error) = cli.register_and_login().await {
143
- if error.downcast_ref::<OAuthError>().is_some_and(|error| {
144
- matches!(
145
- error,
146
- OAuthError::ClientRegistration(OAuthClientRegistrationError::NotSupported)
147
- )
148
- }) {
+ if let Some(error) = error.downcast_ref::<OAuthError>()
+ && let OAuthError::ClientRegistration(OAuthClientRegistrationError::NotSupported) =
+ error
+ {
149
// This would require to register with the authorization server manually, which
150
// we don't support here.
151
bail!(
0 commit comments